If I have an IIS setting configured both in ApplicationHost.config and web.config, what value is going to be applied? Is it an ApplicationHost.config value because it is global to all websites or web.config value because it overrides it? And what happens when I haven’t configured it in web.config, should it take this setting from ApplicationHost.config?
The particular setting I have to check is:
The reason I’m asking is because I’m getting quite strange results when I try to configure those settings from the C# application. Even if I haven’t configured it for the website and I have manually set the value in the ApplicationHost.config I’m still getting a default value from web.config
Config files inherit their values as you move down in scope (server -> site -> application), but by default it’s only for specific sections. The IIS site has an article on the ApplicationHost.config file as well as configuration delegation.
As an example, there are two different
requestFiltering sections within applicationHost.config: one for an FTP server and one for web sites. You can see how the section for web sites (system.webServer) allows the values to be overridden:
<section name="requestFiltering" overrideModeDefault="Allow" />
Whereas the section under system.ftpServer does not.
<section name="requestFiltering" overrideModeDefault="Deny" />
So, onto your question. You should be able to update the Web.config to modify the allowed content length for your site (and sub-sites), unless you have changed the overrideModeDefault value in your applicationHost.config.
- Changing setting in applicationHost.config to Allow has no effect on 500.19 error
- Is it possible to set these IIS7 settings in a web.config file?
- Does editing applicationhost.config file restarts IIS 7?
- Is there way to tell IIS7 Manager modify handlers in applicationHost.config?
- IIS 7.5 (Express) applicationhost.config: Can a virtualDirectory’s physicalPath be a relative path?
Leave a comment
- 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?