When I built the web application and input data via the app using my localhost, everything went to the DB perfectly but now when I choose the publish option, it selects a totally different DB.
I even rebuilt the edmx for the project. How do I get to choose which SQL DB I want to include in the publish option?
I’m using Visual Studio 2013 Ultimate and SQL Server 2012.
ow when I choose the publish option, it selects a totally different DB.
How do you know?
How do I get to choose which SQL DB I want to include in the publish option?
How do you choose the first time the SqlDB ? ( usually, it is in the config file of the main application)
The database is generally defined from your web.config file. Thus, on the Settings page for Web Deploy, you will have the option to replace the connection string.
So, maybe the first question to ask is are you using Web Deploy or are you deploying to Azure?
By the way, the EDMX will no affect on the hosting of the database as long as you’re using the same connection name in the web.config
Thanks for your post.
Please you can try to check if connectionstring in web.config is consistent with that you choose sql db in the publish option.
#How to: Deploy a Database With a Web Application Project
Hope this can be helpful.