我正在尝试探索由Windows Azure提供的Azure Connect服务。所以我有一个简单的ASP.NET应用程序作为Azure中的Web角色运行,它试图连接到托管在本地系统上的SQL数据库。我遵循了Windows Azure平台培训工具包中提供的所有步骤以及here的步骤。完成这一切后,我能够从本地系统ping通Azure角色VM主机名。我能够从虚拟机内部ping我的本地系统(通过使用mstsc登录到VM来检查这一点)。我可以使用telnet连接到端口1433(使用SQL通信打开)的本地系统。Azure Connect - 无法访问本地托管的数据库
但毕竟这当我尝试访问该数据库托管在我的系统从Azure中托管的应用程序,我得到以下错误:
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
我的连接字符串看起来像下面的东西:
<add name="MyConnectionString" connectionString="Data Source=My-PC\SQLEXPRESS;Initial Catalog=Student;Persist Security Info=True;User ID=user;Password=pass" providerName="System.Data.SqlClient"/>
我已经做了大部分的这些教程能够像SQL Server上的远程连接,使SQL服务器在Windows & SQL身份验证,启用网络DTC访问的远程客户端中提到的设置并打开端口143 3用于防火墙上的传入TCP请求。
但我仍然得到相同的错误。任何人有任何线索?
是的,我发现了这一点得益于以下链接: http://stackoverflow.com/questions/1952904/connecting-to-remote-sql-server-2008-from-windows-azure 并感谢您的帮助太:-) – Vinod 2012-02-05 18:29:20