RSS

Blog posts tagged with 'scripts only'

How to fix "The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))"

Written by Lavish Kumar

written by Lavish Kumar

Solution for an error message saying:


Server Error in '/' Application.

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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Runtime.InteropServices.COMException: The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 

[COMException (0x80070006): The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))]   System.Transactions.Transaction.JitSafeGetContextTransaction(ContextData contextData) +0   System.Transactions.Transaction.FastGetTransaction(TransactionScope currentScope, ContextData contextData, Transaction& contextTransaction) +169   System.Transactions.Transaction.get_Current() +121   System.Data.ProviderBase.DbConnectionPool.GetFromTransactedPool(Transaction& transaction) +15   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +147   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +126   System.Data.SqlClient.SqlConnection.Open() +125   System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure) +52