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

如何使用appcmd修改iis appconfig.config xml文件?,iis,appcmd,Iis,Appcmd,我有一个名为C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet.config的文件,我想添加以下参数 <applicationPool maxConcurrentRequestsPerCPU="10" maxConcurrentThreadsPerCPU="10" requestQueueLimit="10" /> 问题: 如何仅使用appcmd执行此操作?如

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

<applicationPool maxConcurrentRequestsPerCPU="10" 
                 maxConcurrentThreadsPerCPU="10"
                 requestQueueLimit="10" />
问题:

  • 如何仅使用appcmd执行此操作?如果没有一个明确的站点,这是否可能
  • 如果使用注册表更改,是否会覆盖
    aspnet.config
    xml文件
  • 所有3个参数是否可以通过注册表更改以独占方式修改
  • 更改后,测试参数是否生效的最佳方法是什么
  • 参考资料:


    您的标题询问了
    appconfig.config
    (我猜您的意思是
    applicationHost.config
    ?),但在您的问题主体中,您提到了
    aspnet.config
    。请您澄清一下是哪一个,谢谢。
    appcmd
    是为操作IIS配置系统而设计的,它只覆盖了ASP.NET配置的一小部分。因此,不要期望
    appcmd
    在所有情况下都能有所帮助。@Kev在第二个链接中,看起来
    appcmd
    能够更改XML中的一些值,但用户说他们是通过更改注册表来改换的。为了澄清,我的意思是
    aspnet.config
    @LexLi是的,我同意,但不确定它是否涵盖了我的用例,如果没有,注册表更改是否反映了我想要的内容,而无需直接修改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"