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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:28:24+00:00 2026-05-27T01:28:24+00:00

Recently started with ASP.NET and MVC and have a few questions on working with

  • 0

Recently started with ASP.NET and MVC and have a few questions on working with databases.

  • I have the following connection string:

       <add name="EFDbContext" connectionString="data source=.\SQLEXPRESS;InitialCatalog=EFDbContext;MultipleActiveResultSets=True;IntegratedSecurity=SSPI;" providerName="System.Data.SqlClient" />
    

    And a class (EFDbContextInitializer) that derives from another class that implements the IDatbaseInitializer interface which creates the database if database does not exist. However when it’s created it works and all and the database
    is obviously created somewhere. However I cannot see it in my SQL
    manager in Visual Studio. The database is probably mounted with the built in ./SQLEXPESS so I
    figure I should be able to access it somehow when application is not running ? Where is the thing?

  • Also I have another existing database an *.mdf type that I want to
    transfer a bunch of tables to from the above database that
    (EFDbContextInitializer) created. The tables I want to export are for the ASPNET
    membership provider implementation . I actually used the *.mdf database at first with my
    application, but then decided to exclude it from the project so that a
    new database could be created with the proper tables for the
    membership provider as I don’t think it’s possible or practical to
    try and add those tables to an existing database using the the
    (EFDbContextInitializer) way and now I don’t want to recreate all the
    data in my *.mdf database that I excluded from the project or manually put anything into seed() method. Just want to use my *.mdf database again and add the membership provider tables to it that were created by the (EFDbContextInitializer) in that illusive database.

    What is the best tool or method to go about transferring those tables
    to the *.mdf database? If I gotta write lots of T-SQL queries please point to some examples. I probably don’t know how to use it but I don’t think there’s
    anyway this can be done in the SQL manager in Visual Studio? I know there’s compare database
    option where you can get the target to match the source, or just get certain tables but once
    again I don’t know where to find that database that was created automatically. Also should I look
    into installing some SQL database management tool? I am using Windows 7 Pro so I take it I can’t just
    install a full blown SQL server 2008 R2 suite and use the management studio there so what other tools are available to me for proper db management.

  • 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-27T01:28:25+00:00Added an answer on May 27, 2026 at 1:28 am

    AD1. Sure you can connect to these DB’s – just connect to .\SQLEXPRESS instance of you local MS SQL Express server using Windows Authentication.
    Optionally you can check if the database was created for you on the file system by going to :

    C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA
    

    AD2. To add Application Services structures (tables,stored procedures, views) you can use aspnet_regsql.exe GUI tool if you are using asp.net 4.0 it’s in

    c:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regsql.exe
    

    This will recreate the structure for you. Othwerwise if you would like to keep using your .mdf database for Application Services puproses you only need to add connection string entry in your Web.config. Something like the below should work for you

    <add name="ApplicationServices"
         connectionString="data source=|DataDirectory|aspnetdb.mdf;;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
         providerName="System.Data.SqlClient" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently started to examine ASP.NET MVC. I have studied quite a few
This is a very elementary I realize, I have recently started working with asp.net
Recently I've started to write on asp.net mvc framework. I have a problem. I
Recently i am started working on ASP.NET MVC ( along with Linq to SQL).I
I have recently started using ASP.Net MVC 3 RC 2 and have attempted to
I have recently started a personal project that uses ASP.NET MVC (RC1 at the
Recently I started working with MVC, before that I used classic ASP.NET. After using
I have started to use telerik grids recently (for ASP.NET MVC). The 'Linq-based expression
I recently started reading about ASP.net MVC and after getting excited about the concept,
I've just recently started to build a web site using ASP.NET - MVC 4,

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.