Transform Web.config When Deploying a Web Application Project

When we develop asp applications, usually the Web.config file has values that allows the application to work on your development environment. Transforming Web.config file makes the deployment of applications easier, because you don’t need to change variables manually every time you deploy your application. In this article I’ll explain how to transform Web.config when deploying a web application project.

1. Open your ASP application with Visual Studio. Go to menu “BUILD -> Configuration Manager” to create the build configuration:

configuration manager visual studio asp tutorials

2. In solution Explorer, expand the Web.config file. Here you will see two files: a transform file for the Debug build (Web.Debug.config) and a transform file for the release build (Web.Release.Config):

expand webconfig asp tutorials

3. Open the transform file for the build configuration that you want to work with. Edit the transform file to set the changes that you want to apply when you application gets deployed:

changing variables transform web config

4. This feature will save you deploying and development time, especially if you need to deploy your application in different environments. Just make sure you enter the right data source and database credentials before deploying.

This concludes Transform Web.config When Deploying a Web Application Project.

Looking for quality ASP Web Hosting? Look no further than Arvixe Web Hosting!

Happy Hosting!

Rodolfo Hernandez

Tags: , , , , , , , , , , , , , , , , , , , , , | Posted under ASP .NET 3.5, DotNet/Windows Hosting | RSS 2.0

Author Spotlight

Rodolfo Hernandez

I like photography and reading books. Currently working for Arvixe as Elgg Community Liaison. Elgg Security Expert Web Security Expert CEO of UDP SW Social Web

Leave a Reply

Your email address will not be published. Required fields are marked *