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 4622964
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:55:04+00:00 2026-05-22T02:55:04+00:00

How do you deploy a database when you deploy an ASP.NET MVC application to

  • 0

How do you deploy a database when you deploy an ASP.NET MVC application to production?

I’ve created a standard ASP.NET MVC3 application that uses SQL Server 2008 (albeit Express) for my app. I’m using the standard forms authentication stuff that comes with ASP.NET MVC apps.

If I have to re-create my schema, for all my classes (i.e. the non aspnet_* tables), then I have SQL scripts I can run against the production DB; but what about the aspnet_* tables?

Or should I simply upload an ASP.NET MVC empty DB (~10MB) and then run my scripts against it to create my tables? Surely, there must be a better way.

(Once this is solved, I plan to use SQL scripts or DB migrations to handle changes; it’s only the question of generating the initial database in production without uploading the ~10MB .MDF that I can’t get around, because of the aspnet_* tables.)

  • 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-22T02:55:04+00:00Added an answer on May 22, 2026 at 2:55 am

    You can use aspnet_regsql.exe, located under C:\Windows\Microsoft.NET\Framework[your framework] to generate the schema in your db.

    Run:

    aspnet_regsql.exe /?
    

    and you will see all of the command-line options this executable takes. -A lets you specify what features (i.e., tables) will get created. If you do not use roles, for example, you may just use -A mp.

    You can choose to have it modify your database directly, or instead create a script that you can run. Some details here: http://weblogs.asp.net/lhunt/archive/2005/09/26/425966.aspx

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

Sidebar

Related Questions

When we develop an ASP.NET client site, we deploy a SQL Server Express database
My ASP.NET MVC 2 application uses Entity Framework 4.0 for the data model. Following
I have created a application which uses Sqlite database. Now i wanted to deploy
I am having an ASP.NET Web application that i will deploy to an Internet
I have to deploy my ASP.NET application into two seperated IIS servers. My application
I've recently reached the stage where an ASP.net MVC application I am developing is
I have an asp.net mvc application and now I need to add a web
We've built an application on top of ASP.NET MVC. We now need to allow
I'm trying to deploy an asp.net application. I really suck at it. Anyway, parts
I'm building a small web application with ASP.NET MVC 2, using db4o as a

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.