我正在尝试连接到 AWS RDS 中的 SQL Server 2012 数据库。代码在 Debug 中工作,它倾向于证明连接字符串、AWS 配置……都很好。我使用 FTP 检查了部署在 Azure 中的连接字符串,一切都很好,但是当我调用 Connection.Open() 时,我收到以下错误(堆栈跟踪的相关部分):
[01/26/2016 12:45:00 > 8c2620: INFO] System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) ---> System.ComponentModel.Win32Exception (0x80004005): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
[01/26/2016 12:45:00 > 8c2620: INFO] at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
我尝试在 Azure 中设置一个网络安全组(允许所有端口/所有 IP/TCP/UDP 输入/输出)。它没有帮助,但我无法完全理解 WebJob 是否受到此安全组的影响(我是 Azure 的新手,发现界面有点混乱)。有没有办法将政策与工作联系起来,或者政策是否适用于服务器范围?
我应该提到我正在使用 AWS 和 Azure 的免费帐户(这可能会限制我的选择?)
有没有人遇到这个问题?有没有人有任何提示?
提前致谢