System.InvalidOperationException: Handle is not initialized
System.InvalidOperationException: Handle is not initialized
This exception occured when I ran an ASP.NET Application with WebDev.WebServer.exe. It was performing multiple insert statements.
An unhandled exception occurred and the process was terminated.
Application ID: c0fb25be
Process ID: 952
Exception: System.InvalidOperationException
Message: Handle is not initialized.
StackTrace: at System.Runtime.InteropServices.GCHandle.get_Target()
at Devart.Data.Linq.o.i()
at Devart.Data.Linq.d.a(Int32 A_0)
at Devart.Data.Linq.y.a(a A_0)
at Devart.Data.Linq.y.a.b()
An unhandled exception occurred and the process was terminated.
Application ID: c0fb25be
Process ID: 952
Exception: System.InvalidOperationException
Message: Handle is not initialized.
StackTrace: at System.Runtime.InteropServices.GCHandle.get_Target()
at Devart.Data.Linq.o.i()
at Devart.Data.Linq.d.a(Int32 A_0)
at Devart.Data.Linq.y.a(a A_0)
at Devart.Data.Linq.y.a.b()
Today our application was down for a few minutes. In Windows Aplicataion Event Log is this exception. We are using the latest beta version of dotConnect for Mysql (5.70.102.0).
After this error IIS recycled the application.
After this error IIS recycled the application.
Code: Select all
An unhandled exception occurred and the process was terminated.
Exception: System.InvalidOperationException
Message: Handle is not initialized.
StackTrace: at System.Runtime.InteropServices.GCHandle.get_Target()
at Devart.Data.Linq.c.i()
at Devart.Data.Linq.g.a(Int32 A_0)
at Devart.Data.Linq.e.a(a A_0)
at Devart.Data.Linq.e.a.b()
-
- Posts: 4
- Joined: Wed 21 Jul 2010 15:51
We are also experiencing this exception
07/20/2010 16:58:55 Unhandled Exception:
This exception occurs within the execution path of a single thread. The answer provided by AndreyR is "Make sure you are using one DataContext object per thread" In our current code, we create a data context at the beginning of an operation, and dispose of it when we commit the transaction. We create and destroy multiple data contexts for the duration of the operation. However, we only have one active data context on a thread at any given time, and a thread only ever uses that one data context.
We have spent a significant amount of time attempting to track this down. Any assistance would be greatly appreciated.
Code: Select all
System.InvalidOperationException: Handle is not initialized.
07/20/2010 16:58:55 at System.Runtime.InteropServices.GCHandle.get_Target()
07/20/2010 16:58:55 at Devart.Data.Linq.c.i()
07/20/2010 16:58:55 at Devart.Data.Linq.g.a(Int32 A_0)
07/20/2010 16:58:55 at Devart.Data.Linq.e.a(a A_0)
07/20/2010 16:58:55 at Devart.Data.Linq.e.a.b()
We have spent a significant amount of time attempting to track this down. Any assistance would be greatly appreciated.