Update: the problem I was facing is still there and with no solution. I must be doing something wrong, but I can't figure out what. It involves a web service in NET 2.0, added with Web Reference in another app. The service has a method that takes a lot of time. If I do it synchronously it works, depending on the Timeout property of the web service proxy and the executionTimeout setting in the web.config. If I do it asynchronously, though, it doesn't work! If it takes too long it just kills the thread. The Timeout property of the web service doesn't even count in async calls. My solution was to call the method synchronously and be done with it. If anyone has an answer for this, please let me know!
(Oh, but if you mean to tell me that an asynchronous operation in a web service should not take long and that it is bad design and so on and so on, don't let me know!)
The single most related article to my problem that I found on the net is this: timeout problem with webservice and suggests a client problem, but no solution other than asynchronously calling the synchronous call to the web service, and no explanation to the underlying problem.
As for the regular solution for Thread being aborted, it actually it's not my solution, it was given in a forum by a guy with the nickname dstefanov, but I stole it with impunity :)
Here it is:
ThreadAbortException happens when the thread serving the request doesn't finish for a long time. The ASP.NET hosting process aborts this thread after certain time. You can adjust that time with:
<httpRuntime executionTimeout="600" />
By default the executionTimeout="90" seconds.
This applies to ASP.Net web apps, including web services, so also to console or windows forms applications that use web services. My own personal favourite is 86400, the number of seconds in a day.