I have an ASP.NET application running under IIS. I'd like to be able to change one of the web.config values in Application Settings. I know it's possible to change it programmatically as described in this answer but I'm wondering if the same thing can be accomplished from the command line.
The IIS 7 Manager allows application settings and connection strings (among other options) to be changed. My hope is there is a way to do the same via the command line for IIS 6 and/or 7.
Click on Websites and Domains tab and click Show More at the bottom of the page. Click the icon for File Manager. Click on your web. config.
The machine. config file file is at the highest level in the configuration hierarchy while Web. config file is to override the settings from the machine. config file.
The Web. Config file is used to configure Oracle Web Application functionality. This file is typically installed in the c:\Inetput\wwwroot\WebApp directory.
You can use AppCmd.exe which is included with IIS 7.0 and above, in fact Configuration Editor in IIS Manager will automatically generate the command line for you, for example here it will set the test key to NewValue for the /TestApp inside Default Web Site:
appcmd.exe set config "Default Web Site/TestApp" -section:appSettings /[key='test'].value:"NewValue"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With