如何使用appcmd修改iis appconfig.config xml文件?

时间:2018-09-04 16:48:46

标签: iis appcmd

我有一个名为C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config的文件,我想添加以下参数。

<applicationPool maxConcurrentRequestsPerCPU="10" 
                 maxConcurrentThreadsPerCPU="10"
                 requestQueueLimit="10" />

我没有配置站点,我只想修改全局aspnet.config文件。我尝试了这些命令,但是都没有修改xml,也没有办法验证更改是否生效。

$ appcmd set config /section:processModel /requestQueueLimit:250000 /commit:MACHINE
Applied configuration changes to section "system.web/processModel" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE"
$ appcmd set config /section:system.webserver/serverRuntime /appConcurrentRequestLimit:100000
Applied configuration changes to section "system.webServer/serverRuntime" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"

问题:

  1. 如何仅使用appcmd来执行此操作?如果没有定义的站点,是否有可能?
  2. 如果我使用注册表更改,是否会覆盖aspnet.config xml文件?
  3. 可以通过注册表更改专门修改所有3个参数吗?
  4. 进行更改后,测试参数是否生效的最佳方法是什么?

参考文献:

0 个答案:

没有答案