在远程服务器 SQL 2005 上部署时出现 NT AUTHORITY\NETWORK SERVICE 问题

发布于 2024-07-06 08:05:45 字数 358 浏览 5 评论 0原文

当尝试连接到远程服务器上的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

两相知 2024-07-13 08:05:45

在远程服务器上,为强制 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文