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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:53:07+00:00 2026-05-24T07:53:07+00:00

essentially what I’m trying to do is get my head around Microsoft’s ASP.NET MVC

  • 0

essentially what I’m trying to do is get my head around Microsoft’s ASP.NET MVC 3.0. I’m using Visual Studio 2010 Ultimate. I followed the video tutorial at http://www.asp.net/mvc/videos/5-minute-introduction-to-aspnet-mvc which got me up and running and as a result have created a website which accesses a local database.

Question 1:

Does anyone know where that local database is? I believe it’s using a default SQLEXPRESS db somewhere. It doesn’t show up in Server Explorer, it’s not in the App_Data folder. I cant find it in any folder anywhere. It was – as I understand it – generated automatically using a model from the project and nowhere does it tell me where it’s put it.

Question 2:

What I’d really like to do is put the project online to play about with, and I’ve done that already by way of AppHarbor.com. They let you create a MS SQL Server database and give you a replacement connection string to bung in Web.config, but having replaced the connection string and rebuilt the solution – even after adding the AppHarbor database (I’m pretty sure pointlessly) to Server Explorer, my site still uses the elusive SQLEXPRESS database which I cant find.

The change I made in Web.config was from:

  <connectionStrings>
    <add name="ApplicationServices"
         connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
         providerName="System.Data.SqlClient" />
  </connectionStrings>

To the format

<connectionStrings>
    <add name="TestDB"
         connectionString="Server=SERVER;Database=DBNAME;User ID=USERID;Password=DBPASSWORD;" />         
</connectionStrings>

Question one would be nice to know, but it’s question 2 that’s really bothering me. What reference to the database have I missed that is causing it to use a database that I don’t want it to and know nothing about? I figure that there must be one, not least because when I remove the connection string completely from Web.config the thing still runs along fine.

Any help would be greatly appreciated.

  • 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-24T07:53:08+00:00Added an answer on May 24, 2026 at 7:53 am

    So I finally worked out what the problem was – aided in no small part by everyone’s help here. So thank you. There were two main things I had wrong.

    Firstly, turns out that the name of the connection string is important. I needed to name my connection string after the context I’d set up in MVC. So my “TestDB” was wrong, and instead for the video tutorial I linked to in my question the connection string should be called “SportsContext”.

    So in the end, my connection string entry for Web.Config looked like this:

    <connectionStrings>
    <add name="SportsContext" connectionString="Server=SERVER;Database=DBNAME; User ID=USERID;Password=PASSWORD" providerName="System.Data.SqlClient" />
    </connectionStrings>
    

    Which interestingly enough is not what they tell you that you should use on appharbor. Secondly, and another key point I was missing, while MVC will happily build your databases for you in SQLEXPRESS, it won’t do the same for SQL Server. And when building them yourself in SQL Server you have to be sure to get everything in correctly, including auto-incrementing ID columns and foreign keys etc.

    Those two changes were all it took get my site up and working.

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

Sidebar

Related Questions

Essentially, the question is in the title. I have a ASP.NET MVC application, and
Essentially Im trying to get many many java clients connect to a socket on
Essentially I want to know if in VB.NET 2005 if using a sqlcommand and
Essentially, I'm trying to store user input in a multi dimensional array using for
Essentially, what I'm trying to do is to check the last access time of
Essentially, I had this idea in my head for a sort of evolution simulator,
Essentially I'm trying to calculate the bisector line between two points. I've got two
Essentially the title of this question explains the essense of what I am trying
Essentially my problem is thus; I have a MVC system that redirects all requests
Essentially, what I'm trying to do is to load/draw a map from a Tiled

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.