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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:04:07+00:00 2026-05-26T08:04:07+00:00

I created an ASP.NET MVC 3 project using the default template, when I ran

  • 0

I created an ASP.NET MVC 3 project using the default template, when I ran it and created an account, it automatically created an MDF file in my App_Data directory.

The problem is my development machine had a community preview of SQL Server ‘Denali’ installed, and the application needs to run on SQL Server 2008 R2 – so I can’t attach the MDF file to the production instance.

I’ve changed the MDF file to be a SQL Server 2008 R2 database, attached it to a local instance, and added this to my web.config file (no connection strings were present before this):

<add name="ApplicationServices" connectionString="Data Source=127.0.0.1;Initial Catalog=MyDB;Integrated Security=True"
        providerName="System.Data.SqlClient" />

But my application still seems to look for the older instance, when I try to login now, I get this error:

A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: SQL
Network Interfaces, error: 26 – Error Locating Server/Instance
Specified)

My question is – when Visual Studio 2010 automatically creates an MDF file for you, is there a connection string specified somewhere other than the web.config file?

I’ve searched through the code and can’t seem to find one. I’ve verified I can connect to the SQL Server 2008 R2 database from other applications.

Any suggestions are welcome.

  • 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-26T08:04:08+00:00Added an answer on May 26, 2026 at 8:04 am

    This was an issue in my Web.config file. It’s fixed now.

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

Sidebar

Related Questions

I have created a new ASP.NET MVC project using the MVC Project Template. According
I have created a sample project using ASP.NET MVC 3 Web Application (Razor) template.
using VS 2008 i created a clean asp.net MVC application project and changed nothing
I have an ASP.NET MVC 3 project that I just created using the project
I have created a sample project in asp .net mvc using vs 2010. In
I have created an asp.net mvc2 project using the standard visual studio template which
I have an ASP.NET MVC project in C# using Forms Authentication and Active Directory
I'm using Visual Studio 2008 . I have created a project with asp.net Mvc
Let's take as an example a standard default ASP.NET MVC project created by Visual
I just created a ASP.NET MVC project in VS2008. When I press F5 to

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.