473,387 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Nullreference exception in Asynchronous webservice call (.Net 2.0)

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
0 1607

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Marty McDonald | last post by:
I create and start several threads, each thread executes the same method - within the method, a web service is invoked. I find that the more threads I use, the longer it takes for all of the...
8
by: TC | last post by:
Hello, I am making an asynchronous call to a webservice and trying to update the web page with the results. The page is not updating. Does anybody know why??? Below is my code:
4
by: Tim Gallivan | last post by:
Hello group, I'm trying to develop a proof of concept webservice which asynchronously calls a function in a DLL. The function raises an event when it is finished, and works when used as part of...
4
by: jim | last post by:
Hi All, I try to make an asynchronous call to a web service method as below under MS visual .NET studio 2003: WebService webSrv = new WebService(); AsyncCallback cb = new...
1
by: kkao77 | last post by:
Someone help me please. I've tried to write an asynchronous method, but it didn't call my web service, do I need to do something in my webservice project to make it work? or if there is...
10
by: Susan | last post by:
I have a process that takes a while to run so I have it running asynchronously so that the user can continue working. My question is that I want to killl the process if the user changes the search...
1
by: Morgan Cheng | last post by:
I have one webservice that involves time-costing computation. For each request, it consumes about 2 seconds computation. Since ASP.NET has 25 threads per CPU to handle requests, this delay turns to...
2
by: =?Utf-8?B?S2FseWFu?= | last post by:
Hi, I have to make multiple calls (about 400K) to a webservice which returns a string. And currently it takes about a week to make all the calls. Instead of waiting for the webservice result ...
0
by: sirmoreno | last post by:
Hi, In my web site I have some long tasks that I want to call without delaying the page rendering - without making the thread that handels the page request wait for the long task to end. I...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.