K
koredump
Hi all,
I have a windows app that makes some asyc calls to my webservice
(WSE 3.0 with MTOM).
thrown on another thread by a class in the System.Web.Services
namespace and I have not been able to
catch it and dispose of it. I've tried placing try/catch blocks in
several places in my code, but this exception doesn't seem to bubble
up the stack.
How can catch and gracefully handle this exception?
Any help greatly appreciated.
Rich
for reference my completed event handler:
private void proxy_DoSomethingCompleted(object sender,
DoSomethingCompletedEventArgs Completed)
{
if(!Completed.Cancelled)
{
if (Completed.Error == null)
{
// do something with the Completed.Results
}
}
}
The Excpeption being thrown:
System.InvalidOperationException was unhandled
Message="There was an error during async processing."
Source="System.Web.Services"
StackTrace:
at
System.Web.Services.Protocols.WebClientProtocol.ProcessAsyncException(WebCl
ientAsyncResult
client, Exception e)
at
System.Web.Services.Protocols.WebClientProtocol.ReadResponseAsyncCallback(I
AsyncResult
asyncResult)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.ContextAwareResult.CompleteCallback(Object
state)
at System.Threading.ExecutionContext.runTryCode(Object
userData)
at
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCle
anup(TryCode
code, CleanupCode backoutCode, Object userData)
at
System.Threading.ExecutionContext.RunInternal(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Net.ContextAwareResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object
result, IntPtr userToken)
at
System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32
errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at
System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32
errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
I have a windows app that makes some asyc calls to my webservice
(WSE 3.0 with MTOM).
exception gets thrown in the client win app. This exception is beingFrom time to time when the user cancels the async call, the following
thrown on another thread by a class in the System.Web.Services
namespace and I have not been able to
catch it and dispose of it. I've tried placing try/catch blocks in
several places in my code, but this exception doesn't seem to bubble
up the stack.
How can catch and gracefully handle this exception?
Any help greatly appreciated.
Rich
for reference my completed event handler:
private void proxy_DoSomethingCompleted(object sender,
DoSomethingCompletedEventArgs Completed)
{
if(!Completed.Cancelled)
{
if (Completed.Error == null)
{
// do something with the Completed.Results
}
}
}
The Excpeption being thrown:
System.InvalidOperationException was unhandled
Message="There was an error during async processing."
Source="System.Web.Services"
StackTrace:
at
System.Web.Services.Protocols.WebClientProtocol.ProcessAsyncException(WebCl
ientAsyncResult
client, Exception e)
at
System.Web.Services.Protocols.WebClientProtocol.ReadResponseAsyncCallback(I
AsyncResult
asyncResult)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.ContextAwareResult.CompleteCallback(Object
state)
at System.Threading.ExecutionContext.runTryCode(Object
userData)
at
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCle
anup(TryCode
code, CleanupCode backoutCode, Object userData)
at
System.Threading.ExecutionContext.RunInternal(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
at System.Net.ContextAwareResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object
result, IntPtr userToken)
at
System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32
errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at
System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32
errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)