locked
incorrect implementation of IAsyncResult: What is this error? How do I fix it? RRS feed

  • Question

  • I am using the standard run of the mill WCF framework in .NET 4.0 to evaluate the framework so that we can be ready to begin developing in it when it gets released. I have a client that is sending string data to a WCF service hosted under IIS on a test server and is expecting a response. Periodically I get the following error in my server logs:

    Event Type: Error
    Event Source: ASP.NET 4.0.30128.0
    Event Category: None
    Event ID: 1325
    Date:  3/17/2010
    Time:  1:18:03 PM
    User:  N/A
    Computer: [REMOVED]
    Description:
    An unhandled exception occurred and the process was terminated.

    Application ID: /LM/W3SVC/1234452652/Root

    Process ID: 1256

    Exception: System.InvalidOperationException

    Message: An incorrect implementation of the IAsyncResult interface may be returning incorrect values from the CompletedSynchronously property or calling the AsyncCallback more than once. The type System.Data.Common.DbAsyncResult could be the incorrect implementation.

    StackTrace:    at System.Runtime.AsyncResult.ThrowInvalidAsyncResult(IAsyncResult result)
       at System.Runtime.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
       at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
       at System.Data.Common.DbAsyncResult.AsyncCallback_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Data.Common.DbAsyncResult.ExecuteCallback(Object asyncResult)
       at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
       at System.Threading.ThreadPoolWorkQueue.Dispatch()
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

    Now, an initial search for info yeilded only one result: http://blogs.msdn.com/toddca/Default.aspx?p=2

    While this provides some great information under: IIS 6 Crashing With Some Asynchronous Handlers

    It does not provide a fix or solution. Is this a bug in the framework/IIS that might be corrected in the release? Should I host it in an alternative fashion? Can anyone provide some additional information on this problem.

    Thanx.

    Wednesday, March 17, 2010 8:38 PM

Answers

All replies