When checking the System.Net.ServicePointManager.DefaultConnectionLimit in .Net 4 in my debugger, I see really high numbers. I see 24 on one machine and see 48 on another machine.
This is even the case for a newly created ASP.NET MVC 3 project without any configuration changes done to it. Is this a bug? The documentation clearly states that the default is 2:
The maximum number of concurrent connections allowed by a ServicePoint
object. The default value is 2.
The DefaultNonPersistentConnectionLimit and DefaultPersistentConnectionLimit fields are more realistic 4 and 2, respectively, but the DefaultConnectionLimit number seems out of range.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
It’s not a bug. It’s propably 12 per CPU.
The value comes from <connectionManagement> in your Web.config or Machine.config. If neither of files contains element it’s probably configured by autoConfig=True setting at <processModel> element.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0