在我们的项目用户使用NHibernate 2.1.1与SQL Server 2008与.NET 3.5。命名管道提供程序,错误:40 - 无法打开与SQL Server的连接?
我面临SQL Server的奇怪问题。我们开发了windows服务,并安装了它,并且运行良好。不幸的错误,当我停止SQL Server中,NHibernate的抛出异常
System.Data.SqlClient.SqlException: 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)
但在重新启动SQL Server之后,无法连接到SQL Server,还抛出了同样的错误。但是我能够通过查询分析器/管理工作室连接SQL Server。
请任何机构可以帮助我解决问题?
感谢
NRK
分析器/工作室是否也使用*命名管道提供程序? – 2010-06-25 09:37:09
NO。它使用默认协议。 – nRk 2010-06-25 10:41:56