小编Sea*_*ner的帖子

SQL连接错误:System.Data.SqlClient.SqlException(0x80131904)

我在几种情况下看到这种情况,并且在基于Web的应用程序连接到SQL 2008 R2服务后端时是间歇性的.用户正在进行点2点连接,并且可以打开和关闭此功能.我认为这是带宽问题,直到我开始在与这个SQL服务器位于同一核心交换机上的终端服务器上看到它.我已经检查了远程连接已启用,在TCP/IP配置中正确设置了端口1433,我看到的唯一原因是远程连接中的超时设置设置为100000而不是无限制.

错误是

System.Data.SqlClient.SqlException(0x80131904):建立与SQL Server的连接时发生与网络相关或特定于实例的错误.服务器未找到或无法访问.验证实例名称是否正确,以及SQL Server是否配置为允许远程连接.(提供者:命名管道提供程序,错误:40 - 无法打开与SQL Server的连接) --->

System.ComponentModel.Win32Exception(0x80004005):找不到网络路径 at

System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection, Action`1 wrapCloseInAction) at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at
System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo,
SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout,
Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean
integratedSecurity, Boolean withFailover) at
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
serverInfo, String newPassword, SecureString newSecurePassword,
Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean
withFailover) at
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo
serverInfo, String newPassword, SecureString newSecurePassword,
Boolean redirectedUserInstance, SqlConnectionString connectionOptions,
SqlCredential credential, TimeoutTimer timeout) at …
Run Code Online (Sandbox Code Playgroud)

.net sql-server named-pipes sql-server-2008

16
推荐指数
1
解决办法
15万
查看次数

标签 统计

.net ×1

named-pipes ×1

sql-server ×1

sql-server-2008 ×1