Hi all,
I've got an automation add-in which calls a web service and returns the
results.
As the web service may take an arbitrary time to return the response, I make
the call in a worker thread, and use workerThread.Join(timeout) in the main
thread to apply a timeout. If the timeout occurs, I throw a TimeoutException,
otherwise I return the result.
However, this often hangs Excel if the web service doesn't respond within
the timeout period - the main thread doesn't return after the specified
timeout period, and Excel stops responding, as does the Windows task bar.
When I run exactly the same thing outside of Excel it works perfectly.
Any ideas as to why it could be hanging Excel, but work fine outside of
Excel?
Thanks,
Jim
jimcross1981@googlemail.com - 18 Sep 2006 12:15 GMT
A bit more information about this...
The automation add-in makes a call to a C# component which just wraps a
COM call, which makes the web service request.
Is there a chance this COM object could be interfering with Excel in
some way? CPU and memory usage are both fine.