问题描述
发生未处理的异常,并已终止进程。ApplicationID:/LM/W3SVC/1/Root/iOfficeProcessID:5076Exception:System.Data.SqlClient.SqlExceptionMessage:用户'iOffice'登录失败。StackTrace:在System.Data.SqlClient.SqlInternalConnection.OnError(SqlExceptionexception,BooleanbreakConnection)在System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObjectstateObj)在System.Data.SqlClient.TdsParser.Run(RunBehaviorrunBehavior,SqlCommandcmdHandler,SqlDataReaderdataStream,BulkCopySimpleResultSetbulkCopyHandler,TdsParserStateObjectstateObj)在System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(BooleanenlistOK)在System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfoserverInfo,StringnewPassword,BooleanignoreSniOpenTimeout,Int64timerExpire,SqlConnectionowningObject)在System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(Stringhost,StringnewPassword,BooleanredirectedUserInstance,SqlConnectionowningObject,SqlConnectionStringconnectionOptions,Int64timerStart)在System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnectionowningObject,SqlConnectionStringconnectionOptions,StringnewPassword,BooleanredirectedUserInstance)在System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentityidentity,SqlConnectionStringconnectionOptions,ObjectproviderInfo,StringnewPassword,SqlConnectionowningObject,BooleanredirectedUserInstance)在System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptionsoptions,ObjectpoolGroupProviderInfo,DbConnectionPoolpool,DbConnectionowningConnection)在System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionowningConnection,DbConnectionPoolpool,DbConnectionOptionsoptions)在System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnectionowningObject)在System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnectionowningObject)在System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnectionowningObject)在System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnectionowningConnection)在System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnectionouterConnection,DbConnectionFactoryconnectionFactory)在System.Data.SqlClient.SqlConnection.Open()在iOfficeData.SqlData.ExecuteReader(StringconnectionString,CommandTypecommandType,StringcommandText,SqlParameter[]commandParameters)在iOfficeData.SqlData.ExecuteReader(StringconnectionString,CommandTypecommandType,StringcommandText)在iOfficeService.MailRecive.AutoDownMail()在System.Threading.ThreadHelper.ThreadStart_Context(Objectstate)在System.Threading.ExecutionContext.Run(ExecutionContextexecutionContext,ContextCallbackcallback,Objectstate)在System.Threading.ThreadHelper.ThreadStart()
解决方案
解决方案二:
请高手指点下,谢谢
解决方案三:
可能的问题:1.sql安装的有问题2.访问sql的代码写的不严谨,最大的可能是open后没有做close,每连接一次sql都要open一次,导致越来越多的通道没有关闭,最后就挂了
解决方案四:
兄弟说的第2点靠谱,请问如何做每个连接的close,现在就是用时间长了就会挂了。
解决方案五:
看看链接数
解决方案六:
好像这个连接数据库数量释放的,目前连接人数1人,还有其他可能吗?,数据库是安装的sql2005p4
解决方案七:
这问题nnd太奇怪了,已经很久了,搞的我天天启动服务器,这个错误一出来,百度云也会断开。
解决方案八:
把连接池调整大点试试。具体你百度一下,就是在web.config里面关于数据库连接的那个字符串加个东西。