I was troubleshooting some performance issues today when I found out about this property:
I am currently working on a multi-threaded windows application that uses HttpWebRequest to communicate with external web resources. By default, .NET sets this connection limit to 2. Which means there are only 2 threads available for connecting to an external web resource. As a result, when I throttled my app with more than 2 threads, this setting became a performance bottle neck.
To solve the problem, I just had to raise this limit. The optimal setting of this property depends on the processing power of your app server and the load the web resource can handle. To set this property in code, just access the ServicePoint property on the instance of the HttpWebRequest object.
Alternatively, you can also configure this value in your app.config file with the xml below.
<add address = "*" maxconnection="20" />
posted @ Friday, January 23, 2009 12:20 AM