我无法通过Azure门户设置混合连接,总是没有连接 . 我试图连接到SQL数据库,但“通过”另一台计算机 . 像这样,“网站”< - >“混合连接”< - >“Computer1 [混合连接管理器] < - Computer2 [sql server]”
因为我无法访问computer2,但我可以通过computer1访问sql server,我可以访问该计算机 . 我想要做的是 Build 一个连接到computer2 [sql server]的计算机1的混合连接 . 所有尝试均未成功 . 有人可以帮忙解决这个问题吗?
混合连接设置:
name: clmconnection status: 未连接: hostname computer1 [cpu的名称] port: 1433
的ConnectionString:
add name = "HybridConnection" provider = System.Data.SqlClient; provider
connection string =“Server = computer1,1433; DataBase = databasename;
user id = sa; password = sapassword; MultipleActiveResultSets = True; App = EntityFramework“" providerName=" System.Data.EntityClient”/
1 回答
我们按照以下指南进行操作并启动并运行:
https://azure.microsoft.com/en-us/documentation/articles/web-sites-hybrid-connection-connect-on-premises-sql-server/
您为混合连接提供的计算机的名称应该是您要连接到的SQL Server的名称 . 在您的示例中,连接字符串中的混合连接和服务器中的主机名应为“Computer2”