I'm living in nightmares because of this situation, I have a HttpWebRequest.GetResponse that keeps on giving me a ThreadAbortException, that causes the whole app to go down.
How can I avoid that, or at least handle it, would using Thread.ResetAbort() be useful in such a case?
To explain more here is a rough code sample:
HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://someurl.com/"); HttpWebResponse resp = req.GetResponse();
now the last line above throws the ThreadAbortException, it might be because the request timed out which is fine, but I don't want to get a ThreadAbortException inside my ASP.NET 2.0 app because it kills it. The ThreadAborException can't be caught with try/catch, the only way to handle it is using Thread.ResetAbort() which has its own bad effects too, it will keep the thread alive and god only knows for how long.