Click here to Skip to main content
12,401,324 members (39,719 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# ASP.NET
Dear All;

The problem is as follows:-

I have VS 2010 & SQL Express 2008 which installed alongwith VS 2010.

The problem is I installed a named instance called SQLEXP & deleted default SQLEXPRESS instance .I changed it in Options -> in VS2010 to use new instance works fine I can connect to database

But still the problems appear in a site [created before instance change] when run user cant login as server cant be connected

Error-26 Cannot connect to instance specified;

Why cant the database be connected when I changed it[instance name] in VS settings menu.

Also I could earlier use Website Admin Tool to create users which store in ASPNET.MDF but now it also cant connect in Web admin tool.Any solutions pls?
Posted 9-May-13 22:02pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Update your DataSource in connection string. Go to web.config --> Find your connection string --> Update data source from .\SQLEXPRESS to YourMachineName\SQLEXPRESS.
Try this:
connectionString="data source=YourMachineName\SQLEXPRESS;
   Integrated Security=SSPI;
   Initial Catalog=aspnetdb;" 

Mantu Singh 13-May-13 9:18am
Web config file does not have connection string it worked automatically

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 10 May 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100