Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing a .MDF SQL Server Database with ASP.NET Versus Using SQL Server
    text
    copied!<p>I'm currently writing a website in ASP.NET MVC, and my database (which doesn't have any data in it yet, it only has the correct tables) uses SQL Server 2008, which I have installed on my development machine. I connect to the database out of my application by using the Server Explorer, followed by LINQ to SQL mapping. </p> <p>Once I finish developing the site, I will move it over to my hosting service, which is a virtual hosting plan. I'm concerned about whether using the SQL Server setup that is currently working on my development machine will be hard to do on the production server, as I'll have to import all the database tables through the hosting control panel.</p> <p>I've noticed that it is possible to create a SQL Server database from inside Visual Studio. It is then stored in the App_Data directory.</p> <p>My questions are the following:</p> <ul> <li><strong>Does it make sense to move</strong> my SQL Server DB out of SQL Server and into the App_Data directory as an <code>.mdf</code> file?</li> <li>If so, <strong>how</strong> can I move it? I believe this is called the <code>Detach</code> command, is it not?</li> <li>Are there any <strong>performance/security issues</strong> that can occur with a <code>.mdf</code> file like this?</li> <li>Would my intended setup <strong>work OK with a typical virtual hosting plan</strong>? I'm hoping that the <code>.mdf</code> database won't count against the limited number of SQL Server databases that can be created with my plan.</li> </ul> <p><em>I hope this question isn't too broad. Thanks in advance!</em></p> <p><sub>Note: I'm just starting out with ASP.NET MVC and all this, so I might be completely misunderstanding how this is supposed to work.</sub></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload