【问题标题】:Command to remove web.config entry删除 web.config 条目的命令
【发布时间】:2015-11-18 14:07:29
【问题描述】:

我正在使用下面的命令在 Web.config 中添加一个条目

C:\Windows\System32\inetsrv>appcmd set config "MarketWorkFlowWebApp" section:system.webServer/security/requestFiltering /allowDoubleEscaping:false

输出:

Applied configuration changes to section "system.webServer/security/requestFiltering" for "MACHINE/WEBROOT/APPHOST/MarketWorkFlowWebApp" at configuration commit
 path "MACHINE/WEBROOT/APPHOST/MarketWorkFlowWebApp"

添加设置工作正常。

要删除上面的条目,我正在使用以下命令

 C:\Windows\System32\inetsrv>appcmd set config "MarketWorkFlowWebApp" -section:system.webServer/security/requestFiltering

输出:

Applied configuration changes to section "system.webServer/security/requestFiltering" for "MACHINE/WEBROOT/APPHOST/MarketWorkFlowWebApp" at configuration commit
     path "MACHINE/WEBROOT/APPHOST/MarketWorkFlowWebApp"

但 web.config 仍然包含这些条目。

那么如何从 web.config 中删除任何现有标签。

【问题讨论】:

    标签: iis web-config msdeploy iis-8 appcmd


    【解决方案1】:

    这对我有用:

    appcmd.exe set config "Default Web Site/" -section:system.webServer/security/requestFiltering /allowDoubleEscaping:"True"
    

    然后要澄清它......

    appcmd.exe clear config "Default Web Site/" -section:system.webServer/security/requestFiltering /allowDoubleEscaping
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-02
      • 2015-12-31
      • 1970-01-01
      相关资源
      最近更新 更多