none
Change Config File Extension RRS feed

  • Question

  • Hi,

    Is it possible to change the extension of the App.Config file to App.dat? Any impact or disadvantage?

    Thanks,

    Jassim

    Monday, August 8, 2016 9:12 PM

Answers

  • Nothing that I'm aware of. There are ways to add additional config file but I don't know how to change the name of web.config file.

    For impact, one thing I can think of is that, .config files in .NET websites are by default protected by System.Web.HttpForbiddenHandler, that means their content is never revealed to outsiders even if their type the "~\web.config" equivalent URL to access it. For additional protection, the IIS also add web.config directly to the hidden segment in WebDAV settings. You're reminded that you should add protection to your custom extension or there will be risk of information leak, such as the connection string of database.

    You'll also lose the effect that web.config is monitored and the application pool will be reloaded each time it's altered. This means that after the change you'll have to remember recycling the application pool for the changes to be in effect.

    Tuesday, August 9, 2016 2:24 AM
    Answerer