登录操作间歇性失败

我已经忍受了一段时间的这个bug,但已经达到了接受的极限。 我有一个“罚款”的登录控制。 这意味着它通常能够成功地进行身份验证,但在其他时候,我尝试登录,并且像我打了一道无形的墙。 “'/'应用程序中的服务器错误无法打开用户默认数据库登录失败用户'Selase-PC Selase'登录失败。”

我想我可以等几分钟,然后再次尝试,因为它会在一段时间后再次成功登录,但这已经超出了接受范围。 我不能再等它了,我无法一直等待它,所以我想从我周围可爱的朋友处得到一些解决方案。

它显示了一个非常长的堆栈跟踪,我非常想向你们展示堆栈跟踪读取的内容,但请稍等....

'/'应用程序中的服务器错误。 无法打开用户默认数据库。 登录失败。 用户'Selase-PC Selase'登录失败。 说明:执行当前Web请求期间发生未处理的异常。 请查看堆栈跟踪以获取有关该错误的更多信息以及源代码的位置。

异常详细信息:System.Data.SqlClient.SqlException:无法打开用户默认数据库。 登录失败。 用户'Selase-PC Selase'登录失败。

源错误:

在执行当前Web请求期间生成未处理的异常。 关于异常的来源和位置的信息可以使用下面的异常堆栈跟踪来标识。

堆栈跟踪:

[SqlException(0x80131904):无法打开用户默认数据库。 登录失败。 登录失败,用户'Selase-PC Selase'。] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException异常,Boolean breakConnection)+5009598 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()+234 System.Data.SqlClient。 TdsParser.Run(RunBehavior runBehavior,SqlCommand cmdHandler,SqlDataReader dataStream,BulkCopySimpleResultSet bulkCopyHandler,TdsParserStateObject stateObj)+2275 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)+35 System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo,String +39 System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo,String newPassword,Boolean redirectedUserInstance,SqlConnection owningObject,SqlConnectionString connectionOptions,TimeoutTimer timeout)+239 System.Data.SqlClient.SqlInternalConnectionTds(System.Data.SqlClient.SqlInternalConnectionTds .OpenLoginEnlist(SqlConnection拥有对象 ,TimeoutTimer timeout,SqlConnectionString connectionOptions,String newPassword,Boolean redirectedUserInstance)+232 System.Data.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity,SqlConnectionString connectionOptions,Object providerInfo,String newPassword,SqlConnection owningObject,Boolean redirectedUserInstance)+232 System.Data。 SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions选项,对象poolGroupProviderInfo,DbConnectionPool池,DbConnection拥有连接)+185 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection,DbConnectionPool pool,DbConnectionOptions选项)+33 System.Data.ProviderBase.DbConnectionPool.CreateObject (DbConnection owningObject)+524 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)+66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)+479 System.Data.ProviderBase.DbConnectionFactory.Get Connection(DbConnection owningConnection)+108 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection,DbConnectionFactory connectionFactory)+126 System.Data.SqlClient.SqlConnection.Open()+125 System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context ,布尔值revertImpersonate)+95 System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString,Boolean revertImpersonation)+206 System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username,Boolean updateLastLoginActivityDate,Int32&status,String&password,Int32&passwordFormat,String& passwordSalt,的Int32&failedPasswordAttemptCount,的Int32&failedPasswordAnswerAttemptCount,布尔逻辑isApproved,日期时间&lastLoginDate,日期时间及lastActivityDate)827 System.Web.Security.SqlMembershipProvider.CheckPassword(字符串username,字符串密码,布尔updateLastLoginActivityDate,布尔failIfNotApproved,字符串&盐,的Int32&了passwordFormat)105系统名.web。 Security.SqlMembershipProvider.ValidateUser(String username,String password)+106 System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e)+60 System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e)+129 System。 Web.UI.WebControls.Login.AttemptLogin()+127 System.Web.UI.WebControls.Login.OnBubbleEvent(Object source,EventArgs e)+101 System.Web.UI.Control.RaiseBubbleEvent(Object source,EventArgs args)+ 37 System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e)+125 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)+167 System.Web.UI.WebControls.Button.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String eventArgument)+10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,String eventArgument)+13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)+36 System.Web.UI.Page .ProcessRequestMain(布尔includeStagesBeforeAsyncPoint,布尔includeStagesAfterA 同步点)+5563

版本信息:Microsoft .NET Framework版本:4.0.30319; ASP.NET版本:4.0.30319.1

我希望这会做? 依靠你的回应......干杯

由User422请求的事件日志...

  • 1309 3 3 0x80000000000000 28752应用Selase-PC
  • 3005发生未处理的异常。 2011/1/20 14:34:01 1/20/2011 06:34:01 890c153a58d84bdba72cb0163158407b 23 1 0 42af9d49-5-129399788112990000 Full / C: Users Selase Documents Visual Studio 2010 Projects Prototype5 Prototype5 SELASE-PC 8732 WebDev.WebServer40.exe Selase-PC Selase SqlException无法打开用户默认数据库。 登录失败。 用户'Selase-PC Selase'登录失败。 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException异常,布尔breakConnection)在System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()在System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,SqlCommand cmdHandler,SqlDataReader的dataStream,BulkCopySimpleResultSet System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo,String newPassword,Boolean ignoreSniOpenTimeout,TimeoutTimer timeout,SqlConnection owningObject)上的System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)处的BulkCopyHandler,TdsParserStateObject stateObj) SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo,String newPassword,Boolean redirectedUserInstance,SqlConnection owningObject,SqlConnectionString connectionOptions,TimeoutTimer超时)在System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject,TimeoutTimer超时,SqlConnectionString connectionOp System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions)上System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity身份,SqlConnectionString connectionOptions,对象providerInfo,字符串newPassword,SqlConnection拥有对象,布尔redirectedUserInstance)的字符串newPassword,布尔redirectedUserInstance) (System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject))上System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection,DbConnectionPool池,DbConnectionOptions选项)上的选项,对象poolGroupProviderInfo,DbConnectionPool池,DbConnection owningConnection)。 System.Data.ProviderBas上的System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)上的System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)处的ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) 在System.Web.DataAccess.SqlConnectionHelper的System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext上下文,布尔revertImpersonate)System.Data.SqlClient.SqlConnection.Open()上的e.DbConnectionClosed.OpenConnection(DbConnection outerConnection,DbConnectionFactory connectionFactory)。 GetDocument(String connectionString,Boolean revertImpersonation)在System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(字符串用户名,布尔updateLastLoginActivityDate,Int32&状态,字符串和密码,Int32&passwordFormat,字符串和passwordSalt,Int32&failedPasswordAttemptCount,Int32&failedPasswordAnswerAttemptCount,布尔&isApproved,DateTime&lastLoginDate,DateTime& System.Web.Security.SqlMembershipProvider.ValidateUser(String username,String password)在System.Web.Security.SqlMembershipProvider.CheckPassword(String username,String password,Boolean updateLastLoginActivityDate,Boolean failIfNotApproved,String&salt,Int32&passwordFormat) System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e)在System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e)System.Web.UI.WebControls.Login.AttemptLogin()在System.Web。在System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e)上System.Web.UI.Control.RaiseBubbleEvent(Object source,EventArgs args)处的UI.WebControls.Login.OnBubbleEvent(Object source,EventArgs e)。 Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl ,字符串eventArgument)在System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)在System.Web.UI.Page.ProcessRequestMain(布尔includeStagesBeforeAsyncPoint,布尔includeStagesAfterAsyncPoint)http:// localhost:55098 /帐户/ Login.aspx /帐户/Login.aspx 127.0.0.1 False Selase-PC Selase 12 Selase-PC Selase False System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception,Boolean breakConnection)at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()at System.Data.SqlClient.TdsParser.Run(RunBehavior在System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(布尔enlistOK)在System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo,字符串newPassword,布尔ignoreSniOpenTimeout,超时计时器超时,SqlConnection拥有对象)在System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo,String newPassword,Boolean redirectedUserInstance,SqlConnection owningObject,SqlConnectionString connectionOptions,TimeoutTimer超时)在System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject,TimeoutTimer超时 ,System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity,SqlConnectionString connectionOptions,Object providerInfo,String newPassword,SqlConnection owningObject,Boolean redirectedUserInstance)在System.Data.SqlClient.SqlConnectionFactory.CreateConnection上,SqlConnectionString connectionOptions,字符串newPassword,布尔redirectedUserInstance) (System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject))上System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection,DbConnectionPool池,DbConnectionOptions选项)上的(DbConnectionOptions选项,对象poolGroupProviderInfo,DbConnectionPool池,DbConnection拥有连接) Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)在System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection拥有对象)在System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection拥有Conn (System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext上下文,布尔revertImpersonate)System.Data.SqlClient.SqlConnection.Open()上System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection,DbConnectionFactory connectionFactory) (字符串用户名,布尔updateLastLoginActivityDate,Int32&状态,字符串和密码,Int32&passwordFormat,字符串&passwordSalt,Int32&failedPasswordAttemptCount,Int32&failedPasswordAnswerAttemptCount,.Web.DataAccess.SqlConnectionHelper.GetConnection(字符串connectionString,布尔revertImpersonation)System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat布尔&isApproved,DateTime&lastLoginDate,DateTime&lastActivityDate)在System.Web.Security.SqlMembershipProvider.ValidateUser(字符串用户名,字符串密码,布尔updateLastLoginActivityDate,布尔failIfNotApproved,字符串&盐,Int32&passwordFormat) 用户名,字符串密码)在System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e)在System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e)在System.Web.UI.WebControls.Login.AttemptLogin ()在System.Web.UI.WebControls.Login.OnBubbleEvent(Object source,EventArgs e)System.Web.UI.Control.RaiseBubbleEvent(Object source,EventArgs args)在System.Web.UI.WebControls.Button.OnCommand (CommandEventArgs e)在System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)在System.Web.UI .Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,String eventArgument)at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint)

  • 您的数据库文件库似乎因并发访问而被锁定。 确保你正在使用sql连接。 这是,使用后妥善处理它。 最好将其包装在使用区块中。

    如果您正在使用自定义身份验证方案,请考虑实施您自己的成员资格提供程序类。 这也有助于获得更干净的设计。

    链接地址: http://www.djcxy.com/p/56697.html

    上一篇: Login action fails intermittently

    下一篇: my webservice is not able to login to a local database