System.Net.ServicePointManager.DefaultConnectionLimit == 24 - > BUG? [英] System.Net.ServicePointManager.DefaultConnectionLimit == 24 --> BUG?
问题描述
在检查System.Net.ServicePointManager.DefaultConnectionLimit在.NET 4中在我的调试器中,我看到了非常高的数字。我看到24一台机器上,看到48在另一台机器。
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.
这是即使是新建的ASP.NET MVC 3项目,而不做任何配置变化的情况下。这是一个错误?该文件明确指出,默认为2:
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:
由的ServicePoint允许的并发连接的最大数量 目的。 的默认值为2。
The maximum number of concurrent connections allowed by a ServicePoint object. The default value is 2.
从<一个href="http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.defaultconnectionlimit(v=VS.100).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.defaultconnectionlimit(v=VS.100).aspx
的DefaultNonPersistentConnectionLimit和DefaultPersistentConnectionLimit字段是更现实4和2,分别,但DefaultConnectionLimit数目似乎超出范围。
The DefaultNonPersistentConnectionLimit and DefaultPersistentConnectionLimit fields are more realistic 4 and 2, respectively, but the DefaultConnectionLimit number seems out of range.
推荐答案
这是不是一个错误。这是propably 12%的CPU。
It's not a bug. It's propably 12 per CPU.
该值来自<一个href="http://msdn.microsoft.com/en-us/library/fb6y0fyc%28v=VS.100%29.aspx"><$c$c><connectionManagement>$c$c>在您的Web.config或Machine.config中。如果没有文件包含的元素它可能是由 AUTOCONFIG = TRUE
的<一个设定配置href="http://msdn.microsoft.com/en-us/library/7w2sway1%28v=VS.100%29.aspx"><$c$c><processModel>$c$c>元素。
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.
这篇关于System.Net.ServicePointManager.DefaultConnectionLimit == 24 - &GT; BUG?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!