Skip to content

Instantly share code, notes, and snippets.

@douglas-mason
Last active August 29, 2015 13:56
Show Gist options
  • Save douglas-mason/9233136 to your computer and use it in GitHub Desktop.
Save douglas-mason/9233136 to your computer and use it in GitHub Desktop.
NConfig setup notes for webforms projects

###Configuring NConfig for webforms

  1. Install the nuget package
  2. Add Config folder and custom config file (ex: mycomputername.custom.config)
  3. Add NConfigurator code to global.asax - Example
    NConfigurator.UsingFiles("Config\\Custom.config", "Config\\Connections.config").SetAsSystemDefault();
  4. Make sure your virtual path for the web project is "/" and not "/web", unless you fix the path that NConfig uses
  5. If the application hangs when you try to run it, restart IIS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment