How to prevent webconfig from being automatically generated on build/ & run

Go To StackoverFlow.com

0

I've inherited a visual studio 2010 mvc3 applicaton and the web.config is being generated every time on build and run. I need to change the connection string to test an other database....where is the settting to prevent the web.config from being automatically generated?

Thanks!

2012-04-05 20:42
by JaJ
Why you think it is generated and not copied from some predefined place - sll 2012-04-05 20:43
I don't think the application can run without a web.config... You may want to see if you have some config transforms in place if your changes are being overwritten - SouthShoreAK 2012-04-05 20:43


1

Create a new Configuration for your secondary database and then right click on the Web.config file and select 'Add Config Transforms'.

Then use the information here to adjust the connection string in your alternate configuration:

http://msdn.microsoft.com/en-us/library/dd465326.aspx

2012-04-05 20:49
by Steve Mitcham
Ads