How to create custom web.config in ASP.Net MVC4?

Just for debugging and releasing web.config files is not enough for our deployment process. We use the standard Web.configfor local development, Web.Debug.configfor a common development environment, and Web.Release.configfor intermediate and production environments.

Now we would like to have an excellent configuration for intermediate and production environments.
Is it possible to create a new "staging" configuration, have an associated web.staging.config file and tell the build process to use the transforms that it defines when we select the appropriate publish profile?

+4
source share
1 answer

OK I understood. You need to go to solution properties Configuration>> Configuration Manager. Open the Active solution configurationdrop-down menu> Newto create a new configuration diagram. Leave a check mark Create new project configurations.

Then right-click on the web.config file and click Add Config Transform. Finally, you can edit publication profiles to use the new configuration.

+6
source

All Articles