WebService TimeOut Error

N

Norm Dotti

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?

Thanks.
 

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

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top