Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/sql-server-2008/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 2008 管道错误40建立到SQL Server的连接时发生与网络相关或特定于实例的错误_Sql Server 2008_Asp.net Web Api_Pipe - Fatal编程技术网

Sql server 2008 管道错误40建立到SQL Server的连接时发生与网络相关或特定于实例的错误

Sql server 2008 管道错误40建立到SQL Server的连接时发生与网络相关或特定于实例的错误,sql-server-2008,asp.net-web-api,pipe,Sql Server 2008,Asp.net Web Api,Pipe,这个错误很奇怪,因为我可以连接到我的服务器,但是在正常使用我的应用程序的过程中,我偶尔会在15分钟内收到这个错误。最终,事情会恢复正常。不久之后,错误再次出现。我读过很多帖子,声称问题在于connectionstring和用户名/密码。但是,由于我有时可以连接到它,它不能是我的用户名和密码。我的应用程序是否可能不关闭流,从而造成瓶颈?我真的不知道 { ExceptionMessage = "The underlying provider failed on Open."; Exc

这个错误很奇怪,因为我可以连接到我的服务器,但是在正常使用我的应用程序的过程中,我偶尔会在15分钟内收到这个错误。最终,事情会恢复正常。不久之后,错误再次出现。我读过很多帖子,声称问题在于connectionstring和用户名/密码。但是,由于我有时可以连接到它,它不能是我的用户名和密码。我的应用程序是否可能不关闭流,从而造成瓶颈?我真的不知道

{
    ExceptionMessage = "The underlying provider failed on Open.";
    ExceptionType = "System.Data.Entity.Core.EntityException";
    InnerException =     {
        ExceptionMessage = "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)";
        ExceptionType = "System.Data.SqlClient.SqlException";
        InnerException =         {
            ExceptionMessage = "Access is denied";
            ExceptionType = "System.ComponentModel.Win32Exception";
            Message = "An error has occurred.";
            StackTrace = "<null>";
        };
        Message = "An error has occurred.";
        StackTrace = "   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
\n   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
\n   at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover)
\n   at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
\n   at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
\n   at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
\n   at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData)
\n   at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
\n   at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
\n   at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
\n   at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
\n   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
\n   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
\n   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
\n   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
\n   at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
\n   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
\n   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
\n   at System.Data.SqlClient.SqlConnection.Open()
\n   at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.<Open>b__36(DbConnection t, DbConnectionInterceptionContext c)
\n   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
\n   at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
\n   at System.Data.Entity.Core.EntityClient.EntityConnection.<Open>b__2()
\n   at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.<>c__DisplayClass1.<Execute>b__0()
\n   at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)
\n   at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action operation)
\n   at System.Data.Entity.Core.EntityClient.EntityConnection.Open()";
    };
    Message = "An error has occurred.";
    StackTrace = "   at System.Web.Http.ApiController.<InvokeActionWithExceptionFilters>d__1.MoveNext()
\n--- End of stack trace from previous location where exception was thrown ---
\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__0.MoveNext()";
}
{
ExceptionMessage=“基础提供程序在打开时失败。”;
ExceptionType=“System.Data.Entity.Core.EntityException”;
InnerException={
ExceptionMessage=“建立与SQL Server的连接时发生与网络相关或特定于实例的错误。找不到或无法访问该服务器。请验证实例名称是否正确,以及SQL Server是否配置为允许远程连接。(提供程序:命名管道提供程序,错误:40-无法打开到SQL Server的连接)”;
ExceptionType=“System.Data.SqlClient.SqlException”;
InnerException={
ExceptionMessage=“访问被拒绝”;
ExceptionType=“System.ComponentModel.Win32Exception”;
Message=“发生错误。”;
StackTrace=“”;
};
Message=“发生错误。”;
StackTrace=“at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException异常,布尔breakConnection,Action`1 wrapCloseInAction)
\n位于System.Data.SqlClient.TdsParser.ThroweException和Warning(TdsParserStateObject stateObj、布尔调用方连接锁、布尔异步关闭)
\n位于System.Data.SqlClient.TdsParser.Connect(ServerInfo ServerInfo、SqlInternalConnectionDS connHandler、Boolean IgnoresInOpenTimeout、Int64 TimerSpire、Boolean encrypt、Boolean trustServerCert、Boolean integratedSecurity、Boolean withFailover)
\n位于System.Data.SqlClient.sqlinternalconnectionds.AttemptOneLogin(ServerInfo ServerInfo、String newPassword、SecureString newSecurePassword、Boolean ignoresnopentimeout、TimeoutTimer timeout、Boolean with failover)
\n位于System.Data.SqlClient.SqlInternalConnectionDS.LoginOfAirver(ServerInfo服务器信息、String新密码、SecureString newSecurePassword、Boolean redirectedUserInstance、SqlConnectionString连接选项、SqlCredential凭证、TimeoutTimer超时)
\n位于System.Data.SqlClient.SqlInternalConnectionDS.OpenLoginList(超时超时超时、SqlConnectionString连接选项、SqlCredential凭据、字符串新密码、SecureString NewSecurePrePassword、布尔重定向EdUserInstance)
\n位于System.Data.SqlClient.SqlInternalConnectionDS..ctor(DbConnectionPoolIdentity、SqlConnectionString connectionOptions、SqlCredential凭据、对象提供者信息、String newPassword、SecureString newSecurePassword、Boolean redirectedUserInstance、SqlConnectionString userConnectionOptions、SessionData reconnectSessionData)
\n位于System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions选项、DbConnectionPoolKey poolKey、Object poolGroupProviderInfo、DbConnectionPool池、DbConnectionOwningConnection、DbConnectionOptions用户选项)
\n位于System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool池、DbConnectionOwningObject、DbConnectionOptions选项、DbConnectionPoolKey池键、DbConnectionOptions用户选项)
\n位于System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject、DbConnectionOptions userOptions、DbConnectionInternal oldConnection)
\n位于System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject、DbConnectionOptions userOptions、DbConnectionInternal oldConnection)
\n位于System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject、UInt32 WaitForMultipleObjectsStimOut、布尔allowCreate、布尔OnlyOnEckConnection、DbConnectionOptions用户选项、DbConnectionInternal和connection)
\n位于System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject、TaskCompletionSource`1重试、DbConnectionOptions用户选项、DbConnectionInternal和connection)
\n位于System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection、TaskCompletionSource`1重试、DbConnectionOptions用户选项、DbConnectionInternal oldConnection、DbConnectionInternal&connection)
\n位于System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection、DbConnectionFactory connectionFactory、TaskCompletionSource`1重试,DbConnectionOptions用户选项)
\n位于System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection,DbConnectionFactory connectionFactory,TaskCompletionSource`1重试,DbConnectionOptions用户选项)
\n位于System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1重试)
\n位于System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1重试)
\n位于System.Data.SqlClient.SqlConnection.Open()处
\n位于System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.b_u36(DbConnection t,DbConnectionInterceptionContext c)
\n位于System.Data.Entity.Infrastructure.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget目标,操作`2操作,操作`3执行,操作`3执行)
\n位于System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection连接,DbInterceptionContext interceptionContext)
\n位于System.Data.Entity.Core.EntityClient.EntityConnection.b__2()
\n位于System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.c__DisplayClass1.b__0()
\n位于System.Data.Entity.SqlServer.DefaultSqlExecutio