asp.net – ASP .NET ProcessModel配置
根据MSDN for ProcessModel中的
this文档,autoConfig = true根据此
KB文章设置以下属性:
maxWorkerThreads,maxIoThreads,minFreeThreads,minLocalRequestFreeThreads,maxConnection 为验证此设置,我在ASP .NET 3.5中有一个示例Web应用程序,在page_load事件中具有以下代码: int w,c; ThreadPool.GetMinThreads(out w,out c); // Write the numbers of minimum threads Response.Write("Min: " + string.Format("{0},{1}",w,c)); w=0; c = 0; ThreadPool.GetMaxThreads(out w,out c); Response.Write(" Max: " + string.Format("{0},c)); Response.Write(" Maxconnections: " + ServicePointManager.DefaultConnectionLimit); Configuration conf = ConfigurationManager.OpenMachineConfiguration(); ConfigurationSectionGroup secGrp = conf.SectionGroups["system.web"]; ConfigurationSection sec = secGrp.Sections["httpRuntime"]; Response.Write(" httpruntime settings: " + sec.ElementInformation.Properties["minFreeThreads"].Value + "," + sec.ElementInformation.Properties["minLocalRequestFreeThreads"].Value); Response.Flush(); 当我首先将autoConfig设置为false然后设置为true运行页面时,我得到以下输出: autoConfig = false:Min:2,2 Max:40,40 Maxconnections:10 httpruntime settings:8,4 autoConfig = true:Min:2,2 Max:200,200 Maxconnections:24 httpruntime settings:8,4 autoConfig = false按预期工作,输出中可以看到默认值,但设置为true时的输出让我感到有些惊讶: >它确实正确设置了maxWorkerThreads和maxIoThreads属性,因此输出为200(双核CPU上为100×2). 我有点困惑,关于这里发生了什么的任何想法?我有错误的样品吗? 解决方法
我的猜测是你正在处理以下相同的逻辑:
WCF 4: Higher Default Throttling Settings for WCF Services 在WCF 4中,我们修改了这些设置的默认值,以便人们在大多数情况下不必更改默认值.以下是主要变化: ·MaxConcurrentSessions:默认值为100 * ProcessorCount ·MaxConcurrentCalls:默认值为16 * ProcessorCount ·MaxConcurrentInstances:默认值是以上两者的总和,它遵循与之前相同的模式. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- ASP.NET MVC 5从Javascript Error调用控制器方法
- asp.net – 使用string.format绑定到文本框
- asp.net-mvc – ASP.NET MVC 2预览2:区域重复控制器问题
- 如何将作为ASP.NET图像控件提供的图像居中?
- asp.net-mvc-3 – 绑定到视图模型的MVC3 Razor – TextBoxF
- asp.net – 访问offsetParent时是否存在IE 6/7“未指定错误
- 展望asp.net core Blazor项目c#编译为原生WebAssembly
- asp.net – WebForms中的强类型容器
- asp.net-core – 调试器中的ASP.NET核心命令行参数
- asp.net-mvc – ASP.NET MVC JavaScript路由
- 如何在ASP.Net 5 Web API中启用OData
- asp.net-mvc – 在MVC文件上传中Request.files为
- asp.net-core – 在Visual Studio 2015 for ASP.
- ASP.NET按钮重定向到另一个页面
- asp.net-mvc-3 – ASP.NET MVC3项目并不总是发布
- asp.net-mvc – 如何在Visual Studio 2015中快速
- ASP.NET MVC从请求参数中删除双正斜杠
- asp.net – 从JavaScript读取web.config
- asp.net-mvc – ASP.NET MVC – 表单和模型绑定器
- 我可以在ASP.NET中获取浏览器时区,还是依靠JS操作