I want to know how to automatically change the connection string of my application, so when I work on it on my computer, it uses my local SQL Server, and as soon as I publish it, it uses SQL Server, which I posted on blue.
Now I just comment on the connection string depending on what I want, I saw that the Web.Config file has 2 dependencies, Web.Debug.config and Web.Release.config, where I think I have something to do but I don’t know that.
This is my web.config file so far
<connectionStrings>
<add name="MyApp" connectionString="Data Source=mydb.database.windows.net;Initial Catalog=MyDb;User ID=MyUser@mydb.database.windows.net;Password=MyPwd;Encrypt=true;Trusted_Connection=false;" providerName="System.Data.SqlClient" />
</connectionStrings
As you can see, I have two connection strings that I have, but this is really annoying.