VS 2010 Web Deployment
page 7 of 12
by Scott Guthrie
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 45764/ 127

Web.Config Transformations

In most real-world deployment scenarios, the web.config file you use for development is different than the one you use for production deployment.  Typically you want to change environment settings like database connection-strings, making sure debug is turned off, and enabling custom errors so that end-users (and hackers) don’t see the internals of your application.

VS 2010 now makes it easy to customize/tweak/modify your web.config files as part of your publish/deployment process.  Specifically, you can now easily have build-configuration specific transformation files that can customize your web.config file prior to the application being deployed:

image

You can maintain a separate transform file per Visual Studio build-environment.  For example, you could configure your project/solution to have a “Debug”, “Staging” and “Release” build configuration – in which case VS will maintain three separate transform files for you.  VS will automatically apply the appropriate one at deployment time depending on what your VS environment is set to.

I will dive deeper into how to perform web.config file transformations in a future blog post.


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-06-25 12:25:07 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search