Controlling HTTP Connection Limits

I need to make many simultaneous HTTP calls to the same service from my client application. How do I increase the limit on the number of HTTP connections?

This setting isn't available on any of the bindings or binding elements but the default limit can be set through the DefaultConnectionLimit property on System.Net.ServicePointManager. This will change the limit for every server you want to connect to. Alternatively, you can control the connection limit very granularly through configuration.

 <system.net>
<connectionManagement> 
<add address="..." maxconnection="2" /> 
</connectionManagement> 
</system.net>

The address can be for a particular HTTP address or for a plain machine name. Use the wildcard character * for the address to set the default connection limit through configuration. If a request can match against more than one of the configuration entries, then the most specific entry is the one that will be used.

Next time: Mapping Credentials to Authentication Schemes