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?