Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 720283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:44:26+00:00 2026-05-14T05:44:26+00:00

I’m currently writing a website in ASP.NET MVC, and my database (which doesn’t have

  • 0

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.

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.

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.

My questions are the following:

  • Does it make sense to move my SQL Server DB out of SQL Server and into the App_Data directory as an .mdf file?
  • If so, how can I move it? I believe this is called the Detach command, is it not?
  • Are there any performance/security issues that can occur with a .mdf file like this?
  • Would my intended setup work OK with a typical virtual hosting plan? I’m hoping that the .mdf database won’t count against the limited number of SQL Server databases that can be created with my plan.

I hope this question isn’t too broad. Thanks in advance!

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T05:44:26+00:00Added an answer on May 14, 2026 at 5:44 am

    The App_Data MDF is a SQL Server database that will be attached just-in-time to a SQL Server instance. The only way to access an MDF is by connecting to a SQL Server. Visual Studio hides what happens behind the scenes, but you are still using a SQL Server instance. This just-in-time attachment of the MDF works only on SQL Express editions. In SQL Express 2005 you would end up with a user instance, see Connecting to SQL Server Express User Instances (ADO.NET). With SQL Express 2008 you can control wether you want a user instance or attach to the service instance.

    You will have to check with your hosting provider to confirm if they count this database as the one database in the plan or not. You have to keep in mind that from resource usage point of view, attaching a database by the connection string (which is what happens when you use the App_Data MDF deployment option) is just as expensive as any other way of opening and running database, so I’d be very surprised to hear they allow it and don’t count against the number of database allowed in the plan.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used javascript for loading a picture on my website depending on which small
I want use html5's new tag to play a wav file (currently only supported
I have a text area in my form which accepts all possible characters from
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I have a reasonable size flat file database of text documents mostly saved in
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.