解决 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.

解决办法

 

转载于:https://www.cnblogs.com/FindDream/p/7301400.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值