IIS 7 and Above
Configuration & Scripting
IIS UI versus appcmd.exe and /commit:apphost
Last post Mar 13, 2010 10:22 PM by CarlosAg
Mar 11, 2010 07:08 PM|sammy_1|LINK
What is the equal action to /commit:apphost
in the IIS UI.?
Folks I doing some scripting for the redirect httpd module
Appcmd.exe set config "default web site/sales" -section:system.webServer/httpRedirect /enabled:True /destination:"www.cnn.com" /httpResponseStatus:"Permanent" /commit:apphost
It works fine in the script. In the UI it create a file called web.conf
xml basses file at the path on the file system where the virtual directory is located, how can I commit the changes to master config file and not web.conf through the IIS manager UI ?
Mar 11, 2010 08:03 PM|lextm|LINK
The design of the UI is completely different from the command line tool, so there is no one-to-one mapping or "equal action".
There is a hack (personally I don't recommend). That is you disable all feature delegation, and then all settings will be written to applicationHost.config from UI.
Mar 13, 2010 10:22 PM|CarlosAg|LINK
The only way to force the UI to save to ApplicationHost.config is as it was mentioned before to make Delegation Read-Only.
The only other alternative is to do that using Configuration Editor which will give you the ability to specify exactly which configuration file you want to read/write.