Click here to Skip to main content
11,805,316 members (64,153 online)
Rate this: bad
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 at 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
0 OriginalGriff 3,265
1 Maciej Los 1,990
2 KrunalRohit 1,907
3 CPallini 1,855
4 Richard MacCutchan 1,227

Advertise | Privacy | Mobile
Web01 | 2.8.151002.1 | Last Updated 10 May 2013
Copyright © CodeProject, 1999-2015
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