sql server - How do I link to a remote database with ASP.NET MVC? -
I have an ASP.NET MVC application and are running, using my SQL Saver Express 2005 database instance, which That's the machine running on my development. When the app is deployed to production, however, the IIS instance and the SQL Server instance will be on different logical machines. I do not know if they are different geographic boxes, but I suspect that matters.
The output DB server is currently in place, with a populated DB on it since I have read access to that example, so I have to make sure that this remote DB connection still works I want to point to this project on my god machine. The schema is the same, of course, the location and content are different.
I currently located on my development machine. There is a project linked to the MDF file. What changes should I make to change this on a DB example on a remote server?
Easy Answer: Change the connection string for your data layer (Linq to SQL? On the Web) Give .config to point out your out-of-process database indentation.
In more detail, here are the steps I have taken to divide the database from my site on my development box. By doing this, you can test this two-server configuration locally before deploying it into production.
Now that your database is placed in the SQL Server Express as a standalone database, you can connect by using the database.
At this point, your development is simulating the environment production environment where the database and IIS process are divided. To indicate the production database, you only have to change your connection string to production.
Comments
Post a Comment