By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,611 Members | 1,642 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,611 IT Pros & Developers. It's quick & easy.

Nullreference exception in Asynchronous webservice call (.Net 2.0)

P: n/a
Hi,

First a brief description of out application:
We have a webapplication which calls a couple of webservices during one
request (postback). These calls to the webservices are made concurrent using
asynchronous webservices calls. The number of webservices called concurrent
is between 1 and 18.
The webservice calls are made using SSL with a X509 clientcertificate.
The application is underhigh load

The problem:
After migration to the .Net Framework 2.0 we once in a while get a
nullreferenceexception during the asynchronous call. The exception seems to
occur somewhere in the framework. It only occurs on our production
environment.

Maybe someone got a clue? See the stacktrace below

The stacktrace is :
NullreferenceException
at
System.Web.Services.Protocols.WebClientProtocol.Re adAsyncResponse(WebClientAsyncResult client)
at
System.Web.Services.Protocols.WebClientProtocol.Ge tResponseAsyncCallback(IAsyncResult asyncResult)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.ContextAwareResult.CompleteCallback(Obj ect state)
at System.Threading.ExecutionContext.runTryCode(Objec t userData)
at
System.Runtime.CompilerServices.RuntimeHelpers.Exe cuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(Exec utionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text
executionContext, ContextCallback callback, Object state)
at System.Net.ContextAwareResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback (Object result,
IntPtr userToken)
at System.Net.HttpWebRequest.SetResponse(Exception E)
at System.Net.HttpWebRequest.CheckWriteSideResponsePr ocessing()
at System.Net.ConnectStream.ProcessWriteCallDone(Conn ectionReturnResult
returnResult)
at System.Net.HttpWebRequest.WriteCallDone(ConnectStr eam stream,
ConnectionReturnResult returnResult)
at System.Net.ConnectStream.CallDone(ConnectionReturn Result returnResult)
at System.Net.ConnectStream.ResubmitWrite(ConnectStre am oldStream,
Boolean suppressWrite)
at System.Net.HttpWebRequest.EndWriteHeaders_Part2()
at System.Net.HttpWebRequest.EndWriteHeaders(Boolean async)
at System.Net.HttpWebRequest.WriteHeadersCallback(Web ExceptionStatus
errorStatus, ConnectStream stream, Boolean async)
at System.Net.ConnectStream.WriteHeadersCallback(IAsy ncResult ar)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback (Object result,
IntPtr userToken)
at System.Net.Security._SslStream.StartWriting(Byte[] buffer, Int32
offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.WriteCallback(IAsyn cResult
transportResult)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.ContextAwareResult.CompleteCallback(Obj ect state)
at System.Threading.ExecutionContext.runTryCode(Objec t userData)
at
System.Runtime.CompilerServices.RuntimeHelpers.Exe cuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(Exec utionContext
executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text
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.Compl etionPortCallback(UInt32
errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at
System.Threading._IOCompletionCallback.PerformIOCo mpletionCallback(UInt32
errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

Best Regards,
Raymond
Jun 28 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.