0

I am using below command to add an entry in Web.config

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

Output :

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

Adding settings is working fine.

To remove the above entry i am using below command

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

OutPut:

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

But web.config still contains those entries.

So how can remove any existing tags from web.config.

Pavan Tiwari
  • 3,077
  • 3
  • 31
  • 71

1 Answers1

1

This works for me:

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

And then to celar it...

appcmd.exe clear config "Default Web Site/" -section:system.webServer/security/requestFiltering /allowDoubleEscaping
Carlos Aguilar Mares
  • 13,411
  • 2
  • 39
  • 36