Saving website level rewrite rules to applicationHost.config
Is it possible to save rewrite rules configured on the level of a website to the applicationHost.config, while using IIS Manager? (I know how to do that manually)
By default they are saved to Web.config file.
I need it to get rules deployed to other servers by MSDeploy tool.
Yes it is possible to do this but you won’t have all the nice UI features that the URL Rewrite applet has.
On the main features view for your site there’s an icon marked “Configuration Editor”, double click to open:

There are two drop down boxes named Section and From:.
The Section dropdown allows you to choose which configuration section you want to edit. It opens up a tree view.
The From: dropdown allows you to choose whether to change the setting in the site’s web.config file or in a <location> element in the applicationHost.config file:

The UI is driven from the raw schema data stored in:
C:\Windows\System32\inetsrv\config\schema
It’s fairly “no-frills” but does expose some configuration elements/attributes that some of the configuration feature applets sometimes don’t show.
Even though fairly basic, it’s safer to use this on a production server rather than hacking away at applicationHost.config directly because you can be guaranteed that you’re putting settings in the right place, using the correct enumeration values and are at less risk from finger trouble.
Check more discussion of this question.
No related posts.
Leave a comment
Recent Posts
- Cron expression that runs every 5 minutes from 1:30 am – 6:00 am [duplicate]
- Understanding redundant power supplies
- Is there a way for administrators to disable users from installing Firefox extensions?
- Is there research material on NTP accuracy available?
- How to create a limited “domain admin” that does not have access to domain controllers?





