This article describes how the Internet Explorer can be configured, so that it allows for more than two concurrent downloads.
Normally, the Internet Explore does only two files at a time from one server. The number of paralell downloads can, however, be altered.
To change the behavior of the Internet Explorer, the following steps are necessary:
Open the registry editor.
Navigate to the key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings.
Create a new value of type DWord called MaxConnectionsPerServer.
Create a new value of type DWord called MaxConnectionsPer1_0Server.
Open the values and enter the maximum number of concurrent downloads.
After the Internet Explorer has been restarted, the new setting becomes active.
This behavior is by design.
- .NET Framework 1.0
- .NET Framework 1.1
When making several connections concurrently with the HttpWebRequest class, the request objects fail with an exception.
When making several connections concurrently (more than 12 on a single processor machine) with the HttpWebRequest class, the request objects fail with an exception.
If these calls are made from methods running on ThreadPool thhreads, the maximum number of connections is further reduced.
The HttpWebRequest uses two threads for each connection from the ThreadPool. This pool has a maximal capacity of 25 on one processor machines. Regularly, if the pool is full, it would queue further requests. But the HttpWebRequest class checks whether two threads are available before putting its requests into the queue. It fails with an exception, when there are less than two threads available.
This behaviour is by design.
Keep concurrent connections as low as possible, and don't initiate requests from methods running on ThreadPool threads.
To keep the concurrent connections low, you can use the Advanced Threadpool from the Toolbox area of this page. This class implements a thread pool, which is independent of the ThreadPool class. With this class, you can set the maximium number of concurrent threads, so that the limit of the ThreadPool is never reached.