在远程服务器 SQL 2005 上部署时出现 NT AUTHORITY\NETWORK SERVICE 问题
当尝试连接到远程服务器上的 SQL 服务器时,我收到一个非常非特定的错误。 我觉得我已经做了所有正确的设置,允许 TCP/IP,重新启动服务,添加了 NT AUTHORITY\NETWORK SERVICE 和数据库的其他相关用户的权限。 我可以访问 aspx 页面,但是一旦我在登录时点击“提交”,我就会得到:
异常信息: 异常类型:SqlException 异常消息:建立与 SQL Server 的连接时发生与网络相关或特定于实例的错误。 服务器未找到或无法访问。 验证实例名称是否正确以及 SQL Server 是否配置为允许远程连接。 (提供程序:命名管道提供程序,错误:40 - 无法打开与 SQL Server 的连接)
I am getting a very non specific error when trying to connect to SQL server on remote server. I feel like I have made all the correct settings, allow TCP/IP, restarted the service, added rights to NT AUTHORITY\NETWORK SERVICE and other related users for the database. I can get to the aspx page, but as soon as I hit submit on the login I get:
Exception information:
Exception type: SqlException
Exception message: 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在远程服务器上,为强制 TCP/IP 和端口的服务器实例创建别名,并在连接字符串中使用该别名。 这样它甚至不会尝试使用 DBNMP。
您也可以尝试在连接字符串中强制解决该问题:
http://connectionstrings.com/article.aspx?article=howtodefinewichnetworkprotocoltouse
On the remote server, create an alias for the server instance that forces TCP/IP and the port, and use that alias in the connection string. That way it won't even try to use DBNMP.
Also you can try forcing the issue in the connection string:
http://connectionstrings.com/article.aspx?article=howtodefinewichnetworkprotocoltouse