Hi,
faser wrote:
In a windows form I execute a lot of HttpWebRequest. Each request run
in his own thread and every requests have the same target server.
Looking at netstat and in the web server logs it seems to me that only
2 connection are opened even if I have 100 threads.
Do you know how can I modify this limit in my application?
Thanks.
The two-connections limits is set by HTTP according to RFC2616. On
Windows clients, you can increase this limit using the following
registry settings:
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Internet
Settings
or to (all users):
HKEY_USERS\.Default\Software\Microsoft\Windows\Cur rentVersion\Internet
Settings
if you are the main or only user on this computer.
In the right hand pane you need to create these 2 DWORD [REG_DWORD]
Values because they are not present by default [don't type the quotes
though :)]:
· "MaxConnectionsPer1_0Server": defines the number of
simultaneous requests to a single HTTP 1.0 server. Double-click on it
and type any integer value between 8 and 32 (I use 16) in the Decimal
box. Default is 4.
· "MaxConnectionsPerServer": defines the number of simultaneous
requests to a single HTTP 1.1 server. Double-click on it and type any
integer value between 4 and 24 (I use 8) in the Decimal box. Default is 2.
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering:
http://www.galasoft-LB.ch
Private/Malaysia:
http://mypage.bluewin.ch/lbugnion
Support children in Calcutta:
http://www.calcutta-espoir.ch