问题描述
“/”应用程序中的服务器错误。系统找不到指定的文件。说明:执行当前Web请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。异常详细信息:System.ComponentModel.Win32Exception:系统找不到指定的文件。源错误:执行当前Web请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。堆栈跟踪:[Win32Exception(0x80004005):系统找不到指定的文件。][SqlException(0x80131904):在与SQLServer建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且SQLServer已配置为允许远程连接。(provider:NamedPipesProvider,error:40-无法打开到SQLServer的连接)]System.Data.SqlClient.SqlInternalConnection.OnError(SqlExceptionexception,BooleanbreakConnection,Action`1wrapCloseInAction)+5352431System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObjectstateObj,BooleancallerHasConnectionLock,BooleanasyncClose)+244System.Data.SqlClient.TdsParser.Connect(ServerInfoserverInfo,SqlInternalConnectionTdsconnHandler,BooleanignoreSniOpenTimeout,Int64timerExpire,Booleanencrypt,BooleantrustServerCert,BooleanintegratedSecurity,BooleanwithFailover)+5363103System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfoserverInfo,StringnewPassword,SecureStringnewSecurePassword,BooleanignoreSniOpenTimeout,TimeoutTimertimeout,BooleanwithFailover)+145System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfoserverInfo,StringnewPassword,SecureStringnewSecurePassword,BooleanredirectedUserInstance,SqlConnectionStringconnectionOptions,SqlCredentialcredential,TimeoutTimertimeout)+891System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimertimeout,SqlConnectionStringconnectionOptions,SqlCredentialcredential,StringnewPassword,SecureStringnewSecurePassword,BooleanredirectedUserInstance)+307System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentityidentity,SqlConnectionStringconnectionOptions,SqlCredentialcredential,ObjectproviderInfo,StringnewPassword,SecureStringnewSecurePassword,BooleanredirectedUserInstance,SqlConnectionStringuserConnectionOptions,SessionDatareconnectSessionData)+518System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptionsoptions,DbConnectionPoolKeypoolKey,ObjectpoolGroupProviderInfo,DbConnectionPoolpool,DbConnectionowningConnection,DbConnectionOptionsuserOptions)+278System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPoolpool,DbConnectionowningObject,DbConnectionOptionsoptions,DbConnectionPoolKeypoolKey,DbConnectionOptionsuserOptions)+38System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnectionowningObject,DbConnectionOptionsuserOptions,DbConnectionInternaloldConnection)+732System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnectionowningObject,DbConnectionOptionsuserOptions,DbConnectionInternaloldConnection)+85System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnectionowningObject,UInt32waitForMultipleObjectsTimeout,BooleanallowCreate,BooleanonlyOneCheckConnection,DbConnectionOptionsuserOptions,DbConnectionInternal&connection)+1057System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnectionowningObject,TaskCompletionSource`1retry,DbConnectionOptionsuserOptions,DbConnectionInternal&connection)+78System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnectionowningConnection,TaskCompletionSource`1retry,DbConnectionOptionsuserOptions,DbConnectionInternaloldConnection,DbConnectionInternal&connection)+196System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnectionouterConnection,DbConnectionFactoryconnectionFactory,TaskCompletionSource`1retry,DbConnectionOptionsuserOptions)+146System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnectionouterConnection,DbConnectionFactoryconnectionFactory,TaskCompletionSource`1retry,DbConnectionOptionsuserOptions)+16System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1retry)+94System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1retry)+110System.Data.SqlClient.SqlConnection.Open()+96System.Web.DataAccess.SqlConnectionHolder.Open(HttpContextcontext,BooleanrevertImpersonate)+88System.Web.DataAccess.SqlConnectionHelper.GetConnection(StringconnectionString,BooleanrevertImpersonation)+239System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(Stringusername,BooleanupdateLastLoginActivityDate,Int32&status,String&password,Int32&passwordFormat,String&passwordSalt,Int32&failedPasswordAttemptCount,Int32&failedPasswordAnswerAttemptCount,Boolean&isApproved,DateTime&lastLoginDate,DateTime&lastActivityDate)+819System.Web.Security.SqlMembershipProvider.CheckPassword(Stringusername,Stringpassword,BooleanupdateLastLoginActivityDate,BooleanfailIfNotApproved,String&salt,Int32&passwordFormat)+88System.Web.Security.SqlMembershipProvider.ValidateUser(Stringusername,Stringpassword)+106System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgse)+59System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgse)+113System.Web.UI.WebControls.Login.AttemptLogin()+119System.Web.UI.WebControls.Login.OnBubbleEvent(Objectsource,EventArgse)+75System.Web.UI.Control.RaiseBubbleEvent(Objectsource,EventArgsargs)+37System.Web.UI.WebControls.Button.OnCommand(CommandEventArgse)+114System.Web.UI.WebControls.Button.RaisePostBackEvent(StringeventArgument)+159System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(StringeventArgument)+10System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandlersourceControl,StringeventArgument)+13System.Web.UI.Page.RaisePostBackEvent(NameValueCollectionpostData)+35System.Web.UI.Page.ProcessRequestMain(BooleanincludeStagesBeforeAsyncPoint,BooleanincludeStagesAfterAsyncPoint)+1724
解决方案
解决方案二:
sqlserver连接不对
解决方案三:
没引用相关的dll文件吧
解决方案四:
SQLServer要配置为允许远程连接