random "The operation has timed-out." exception in vb.net

A

Alex Litvak

I spent the last few hours reading numerous posts on this subject and
haven't been able to find a fix to this problem.

Tried:

- setting HTTP KeepAlive to false (by overriding GetWebRequest)
- adjusting timeout setting



I am running an ASP.Net web service performing 3 tasks (functions).
The first two return a string and never cause any problems. The last
one is kicked off by a request from the client transferring a file as
a byte array to the server at which point the server kicks off a
thread to process the file and returns. The client polls the server
every so often to see if the operation is complete and pulls back a
byte array.

Problem:

When calling the "initiation" function that transfers the file over
and kicks off a thread I get the "The operation has timed-out."
exception. This happens completely randomly. My current work around
is to trap that exception and re-issue the same request recursively
(silly work around) which usually doesn't take more than a second or
two to finally get through. Obviously that's not a great way of
handling this, but I am completely clueless to what is causing the
problem because I cannot narrow it down to when it happens. Sometimes
it will happen on the 2nd request, other times on the 22nd request.
Also, once in a while it will throw the same exception on receiving
back and/or checking if the operation is complete. I am completely
clueless, so any help would be greatly appreciated.

Here is the stack trace:


at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest
request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest
request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters)

If anyone has any ideas that would make my blues go away do tell :)
Thanks in advance.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top