I like to abort HttpWebRequest when necessary from another thread. Is it right way to do it ?
public void Abort()
{
if (request != null)
{
try { request.ReadWriteTimeout = 0; } catch { }
try { request.Timeout = 0; } catch { }
try { request.Abort(); } catch { }
}
}
I believe it will save you some effort to put everything inside one try/catch. Also look at this: Is it possible to abort a Task like aborting a Thread (Thread.Abort method)?