This testcase uncovers several issues:
1) 'EndGetResponse' should throw a 'WebException' if Abort has been invoked. This happens sometimes, other times we get an ObjectDisposedException.
2) Sometimes 'EndGetResponse' deadlocks.
3) Sometimes calling client.BeginGetResponse throws a SynchronizationLockException (or something) when it invokes Monitor.Exit internally. I didn't record the stacktrace, but i'll attach it when i trigger it again.
4) If you add a 'System.Threading.Thread.Sleep (1);' call right after the BeginInvoke the test starts failing because of a ConnectException on only the third iteration http://screencast.com/t/VjiD86bx . If you remove the 'Abort' then everything works as expected for all 100 iterations. Stacktrace of the exception: https://gist.github.com/alanmcgovern/9109e29d7660b7acc5f2
5) Sometimes the entire app crashes because we don't handle the abort correctly internally. I triggered that by inserting a 2ms delay between the 'BeginGetResponse' and 'Abort' calls:
6) Finally another case of the wrong exception being thrown from EndGetResponse: https://gist.github.com/alanmcgovern/26c7ca23fed6a4217365