ASP.NET中processModel配置优化 [英] ASP.NET Processmodel Configuration Optimization

查看:1477
本文介绍了ASP.NET中processModel配置优化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个常规ASP.NET安装将创建具有以下配置的machine.config:

 <&的System.Web GT;
    <中processModel AUTOCONFIG =真/>

我想在web.config中一样覆盖一些属性值:

 <&的System.Web GT;
   <中processModel
     maxWorkerThreads =100
     maxIoThreads =100
     minWorkerThreads =40
     minIoThreads =30
     的memoryLimit =60
   />

我想知道,我是否需要写里面的web.config所有默认属性,否则将自动采取中processModel其他默认属性从machine.config中?

以下是中processModel的属性。

 <中processModel
   启用=真|假
   超时=小时:分钟:秒|无限
   的idleTimeout =小时:分钟:秒|无限
   shutdownTimeout =小时:分钟:秒|无限
   requestLimit =NUM |无限
   requestQueueLimit =NUM |无限
   restartQueueLimit =NUM |无限
   的memoryLimit =百分数
   webGarden =真|假
   cpuMask =NUM
   的userName ={用户名}
   密码={安全密码}
   LOGLEVEL =全部|无|错误
   clientConnectedCheck =小时:分钟:秒|无限
   comAuthenticationLevel =默认|无|连接|电话|
               PKT | PktIntegrity | PktPrivacy
   comImpersonationLevel =默认|匿名|识别|
               冒充|代表
   responseDeadlockInterval =小时:分钟:秒|无限
   responseRestartDeadlockInterval =小时:分钟:秒|无限
   AUTOCONFIG =真|假
   maxWorkerThreads =NUM
   maxIoThreads =NUM
   minWorkerThreads =NUM
   minIoThreads =NUM
   serverErrorMessageFile =
   pingFrequency =无限
   pingTimeout =无限
   maxAppDomains =2000
/>


解决方案

Machine.config中始终继承。

MSDN :


  

多个配置文件,所有
  一个名为Web.config,可以出现在
  一个ASP.NET Web上的多个目录
  应用服务器。每个Web.config文件
  文件适用的配置设置
  它自己的目录和所有子
  目录下面。组态
  儿童目录中的文件可以提供
  除了配置信息
  为从父继承
  目录和子目录
  配置设置可以覆盖或
  修改父定义设置
  目录。根配置
  文件命名
  SYSTEMROOT \\ Microsoft.NET \\框架\\版本号\\ CONFIG \\ Machine.config中
  提供ASP.NET配置
  整个Web服务器设置。


A regular ASP.NET installation will create machine.config with the following configuration:

<system.web>
    <processModel autoConfig="true" />

I would like to override few properties values in web.config like:

<system.web>
   <processModel 
     maxWorkerThreads="100" 
     maxIoThreads="100" 
     minWorkerThreads="40" 
     minIoThreads="30" 
     memoryLimit="60" 
   />

I would like to know that whether i have to write all default properties inside web.config or it will automatically take other default properties of processmodel from machine.config?

Following are the properties of processmodel

<processModel 
   enable="true|false"
   timeout="hrs:mins:secs|Infinite" 
   idleTimeout="hrs:mins:secs|Infinite"
   shutdownTimeout="hrs:mins:secs|Infinite"
   requestLimit="num|Infinite"
   requestQueueLimit="num|Infinite"
   restartQueueLimit="num|Infinite"
   memoryLimit="percent"
   webGarden="true|false"
   cpuMask="num"
   userName="{username}"
   password="{secure password}"
   logLevel="All|None|Errors"
   clientConnectedCheck="hrs:mins:secs|Infinite"
   comAuthenticationLevel="Default|None|Connect|Call| 
               Pkt|PktIntegrity|PktPrivacy"
   comImpersonationLevel="Default|Anonymous|Identify|
               Impersonate|Delegate"
   responseDeadlockInterval="hrs:mins:secs|Infinite"
   responseRestartDeadlockInterval="hrs:mins:secs|Infinite"
   autoConfig="true|false"
   maxWorkerThreads="num"
   maxIoThreads="num"
   minWorkerThreads="num"
   minIoThreads="num"
   serverErrorMessageFile="" 
   pingFrequency="Infinite" 
   pingTimeout="Infinite" 
   maxAppDomains="2000"
/>

解决方案

Machine.config is always inherited.

From MSDN:

Multiple configuration files, all named Web.config, can appear in multiple directories on an ASP.NET Web application server. Each Web.config file applies configuration settings to its own directory and all child directories below it. Configuration files in child directories can supply configuration information in addition to that inherited from parent directories, and the child directory configuration settings can override or modify settings defined in parent directories. The root configuration file named systemroot\Microsoft.NET\Framework\versionNumber\CONFIG\Machine.config provides ASP.NET configuration settings for the entire Web server.

这篇关于ASP.NET中processModel配置优化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆