I have a .net windows service that test network performance by downloading files from a server. I’m using (HttpWebRequest)WebRequest.Create(uri) to create the HTTP requests.
This service is controlled by a timer. When the timer interval is relatively small, the HTTP requests get blocked by the server.
By looking at packet analyzer, it seems like the TCP connection have been reused. How to request a ‘new’ TCP connection for each WebRequest?
Try setting
HttpWebReqeuest.KeepAlivetofalse.