0

appcmd set config "Default Web Site" /section:system.webServer/security/requestfiltering /+fileExtensions.[fileextension='.asax',allowed='true']

I've found this appcmd that sets allowed extensions. Does anyone know how to modify this command so that it sets "allow all unlisted file name extensions" please?

Sharpey
  • 1
  • 1
  • is there a reason why you cant do this via IIS instead? i believe it is easier to manage and setup in the web server you can read how to do so [here](https://www.iis.net/configreference/system.webserver/security/requestfiltering/fileextensions) – Armando Bracho Nov 15 '16 at 10:25
  • Yes, although it's not the default web site, but that change is straightforward enough :) – Sharpey Nov 15 '16 at 10:27
  • We have automated installs from a 3rd party that do not include this setting already in the web.config, so it's something I need to include in a post-install script for now. – Sharpey Nov 15 '16 at 10:33
  • Ok then i believe this is the cmd you are after: appcmd set config /section:requestfiltering /fileExtensions.allowunlisted:true | false you can read further examples [here](https://technet.microsoft.com/en-us/library/hh831621(v=ws.11).aspx) – Armando Bracho Nov 15 '16 at 10:39

0 Answers0