I'm having a problem with timeouts on the third attempt to call a HttpWebRequest.GetRequestStream. This is for debug code to test an intermittent problem with a third party resource, so it is just making the same request over and over.
This problem does not manifest itself when using Fidder as a proxy, so this leads me to believe it has something to do with open connections in the connection pool (I remember reading somewhere that two attempts has something to do with the Http 1.1 spec).
A number of questions talks about closing the request and closing the response, but I have a using statement around both, so thought this would happen automatically when it goes out of scope. However I've also tried calling close and flush on both the request and response streams.
There's also questions that mention setting the ConnectionLeaseTimeout to 0. But that didn't work either.
I'm not sure what else to try, does anyone have any suggestions?