Reputation: 75
In my ASP.Net MVC Project, I have the connection string for the sql server in the webConfig file. But during development we use the test server and while publishing we change the connection string to the mainserver and then we will publish it.
Is there any way to automate this change? For example, in the Beforepublish event or should I do that in different branches?
Upvotes: 0
Views: 35
Reputation: 3900
You can use environment specific web.config files and keep environment specific connection string in respective config file.
Upvotes: 1