解决 System.Runtime.InteropServices.COMException (0x80070006): 句柄无效 错误


  

1. Type : System.Runtime.InteropServices.COMException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

    Message : The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))
    Source : mscorlib

    Help link :

    ErrorCode : -2147024890

    Data : System.Collections.ListDictionaryInternal

    TargetSite : Void ThrowExceptionForHRInternal(Int32, IntPtr)

    Stack Trace :    at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)

       at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)

       at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)

       at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)

       at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory     connectionFactory)

       at System.Data.SqlClient.SqlConnection.Open()

       at Microsoft.Practices.EnterpriseLibrary.Data.Database.OpenConnection()

       at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteNonQuery(DbCommand command)


    2. Type : System.UnauthorizedAccessException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

    Message : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

    3. Type : System.Threading.SemaphoreFullException, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

    Message : Adding the given count to the semaphore would cause it to exceed its maximum count.

解决办法

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM