Used Visual Studio 2008 to publish web app to a local IIS7 Website but still hooked to VS development .mdf file with EF. With this I can successfully access web app via local host. As long as the development db server is running, web access is fine.
Then I tried to change connection to local .\SQLEXPRESS where I have other databases (this is my production server). I have replicated the development data into the SQLExpress database already. The connection string appears OK.
The problem is the application's entity data model (.edmx file) is still tied to the development .mdf file.
When I tried to rebuild the entity data model, I can see the production instance in list of db connections but cannot select it. Only the development db objects are available.
So I don't think the problem is related to connecting to the production db. It is more about getting the .edmx file to point to the production table. Either it should migrate over or it needs to be rebuilt. I don't see any MVC deployment help pages discussing EF deployments.
View Complete Post