When doing the automatic update program, you want to save some trouble and directly use HttpWebRequest and HttpWebResponse to download updated files from the server. Pay attention to the Close response stream when using it:
After using HttpWebRequest.GetResponse() to obtain the HttpWebResponse interface, you must remember to call HttpWebResponse.close to close the stream.
If you use HttpWebResponse.GetResponseStream() to obtain the response stream, then use the Close method of this Stream to close it.
If you use StreamReader.ReadToEnd() to read text from the response stream, the stream will be automatically closed after reading the content.
MSDN describes the HttpWebResponse.close method as follows:
The Close method closes the response stream and releases the connection to the resource for reuse by other requests.
You must call the Stream.Close or HttpWebResponse.Close method to close the stream and release the connection for reuse. It is not necessary to call Stream.Close and HttpWebResponse.Close at the same time, but doing so will not cause an error. Failure to close the stream can cause the application to run out of connections.
The connection limit seems to be a maximum of 2. I don't know if it is a limit of IIS or a limit of local HttpWebRequest.