Intermittant WebService Timeout

Intermittant WebService Timeout

Post by Steve Scha » Wed, 05 Jan 2005 10:55:18


I have a windows client that makes a WebService call on regular intervals
using a timer. This call is very simple and always takes a very short time
to reply. However about every one in ten tries the Call receives a mysterous
timeout error. This is very annoying for my users because since it is a
syncronus call it locks up the interface for the duration of the timeout

I was doing some investigation by watching the packets and it seems that on
the occasions that the timeout occures, that the windows client was in the
middle of a connection check. That is, it seems it was doing some chit chat
on the connection to keep the connection alive and in the middle of this my
application call was made, causing the application call to fail. On this
occation the server responded with an ACK rather than an OK at the end of
its transmision and the client did not recognize this as a proper response.

It appears that there is some kind of low level problem with making
WebService calls during a timer tick. My guess is that the timer tick fires
in the middle of a sequence of events that the proxy class expects to occur
in a certain order.

Anyone have an idea or a similar problem?



1. HELP! Timeout when accessing Webservice.

2. WebService TimeOut Error

I have 2 forms, where Form2 is displayed modeless-ly (
i.e. Form2.Show() ) from Form1. Form1 contains a
Windows.Forms.Timer which triggers at 30 second intervals.
At each 30 second interval, a WebMethod, that returns an
integer, is called. Form1 also contains a button, that,
when clicked, displays Form2. Form2 contains a button, and
in it's click event a long ( may take more than 3
minutes ) SQL query is run via an asynchronous WebMethod
call. Everything works OK until the query starts running.
Approximately, 1 min and 30 seconds after the query starts
running, the WebMethod call in Form1's timer tick
eventhandler throws a "System.Net.WebException" w/
message "The operation has timed-out." About 1 min. 30
secs. after that, the Async WebMethod call in Form2 throws
a "System.InvalidOperationException" w/ message "Client
found response content type of 'text/html', but
expected 'text/xml'. ...". To correct these errors
I've: 1) tried changing the type of Timer used (b/c I
thought it might be a threading issue) - but had same
errors, and 2) tried setting Timeout property to Infinity
fo the syncronous WebMethod call in Form1 - but it still
threw "InvalidOperationException" errors. Any other
suggestions? It appears to me that the asynchronous
WebMethod call is blocking the synchronous method call.
Any ideas why?


3. How to set timeout for WebService?

4. webservice timeout problem in ASP.NET 2.0

5. How to determine WebService timeout on a server side?

6. HELP! Timeout when accessing Webservice.

7. Webservice Error Message Timeout

8. Timeout when calling a webservice from C#

9. calling .NET WebService from classic asp page timeouts on IIS6.0

10. WebService Timeout Problem

11. timeout

12. Webservice Error Message Timeout

13. WebService and Timeout

14. Timeout error on webservice client

15. Timeout when calling a webservice