« Previous Next »

Thread: Disable creating web.configs in each folder

Last post 10-06-2009 12:46 PM by anilr. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 10-06-2009, 12:25 PM

    Disable creating web.configs in each folder

    Is there a way to configure IIS (7.5 / Windows 2008 R2) to stop creating web.config files all over the place when certain settings are changed in IIS Manager, and save all the settings in a central configuration file instead? We would like to do this for a couple reasons.

    1) On a shared server where clients can upload their own files/web.configs, we would like to disable them from being able to configure system.webServer settings by uploading web.configs they upload, bypassing a website we've created for them to manage only the settings we wish for them to be able to change.

    2) We are also working on a custom Authentication Module, so far enabling/disabling authentication modules on a certain folders seems to make IIS create a web.config in that folder. We would like all of the settings to be saved in the central configuration file if at all possible.

    Thanks!

  • 10-06-2009, 12:46 PM In reply to

    • anilr
    • Top 10 Contributor
    • Joined on 05-23-2006, 10:13 PM
    • Redmond, WA
    • Posts 2,342

    Re: Disable creating web.configs in each folder

    If you go to applicationhost.config and lock all the sections (overrideModeDefault="Deny"), then IIS manager will write all IIS config settings to applicationhost.config (same for asp.net config setting and root web.config file).  Note that this will completely prevent someone from being able to use web.config files to override IIS settings - and they may scream about it.

    Anil Ruia
    Senior Software Design Engineer
    IIS Core Server
Page 1 of 1 (2 items)
Microsoft Communities