1

I have and asp.net mvc web app

my issue is I have to change the DB connection string manually in web.config when i try to publish to dev or production server.

<!--i comment this when i publish to prod server-->
<add name="HRCornerDbEntities1" connectionString="urlToDevServer" providerName="System.Data.EntityClient" />

<!--i comment this when i publish to dev server-->
<add name="HRCornerDbEntities1" connectionString="urlToProdServer" providerName="System.Data.EntityClient" />

is there any approach so the web.config connectionString automatically know when i publish to dev or prod server

Gusti Arya
  • 1,225
  • 2
  • 14
  • 31

0 Answers0