N
Norm Dotti
I have 2 forms, Form1 and Form2. Form1 contains a
Windows.Forms.Timer component that triggers at 30 second
intervals. At each 30 second interval, a synchronous
WebService (WebService1), that returns an integer, is
called. Form1 contains a button, that, when clicked,
displays Form2 modelessly (i.e. Form2.Show()). Form2
contains a button, and in it's click event a long (may
take several minutes ) SQL query is run via an
asynchronous WebService (WebService2) call. Everything
works OK until the query starts running. Approximately, 1
min and 30 seconds after the query starts running, the
WebService 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 the same
errors, and 2) tried setting the Timeout property to
Infinity for the synchronous WebMethod call in Form1 - but
it still threw "InvalidOperationException" errors. Any
other suggestions? It appears to me that the asynchronous
WebService call is blocking the synchronous method call.
Any ideas why?
Windows.Forms.Timer component that triggers at 30 second
intervals. At each 30 second interval, a synchronous
WebService (WebService1), that returns an integer, is
called. Form1 contains a button, that, when clicked,
displays Form2 modelessly (i.e. Form2.Show()). Form2
contains a button, and in it's click event a long (may
take several minutes ) SQL query is run via an
asynchronous WebService (WebService2) call. Everything
works OK until the query starts running. Approximately, 1
min and 30 seconds after the query starts running, the
WebService 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 the same
errors, and 2) tried setting the Timeout property to
Infinity for the synchronous WebMethod call in Form1 - but
it still threw "InvalidOperationException" errors. Any
other suggestions? It appears to me that the asynchronous
WebService call is blocking the synchronous method call.
Any ideas why?