Click here to Skip to main content
15,913,486 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 ASP.net 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

1 solution

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



--Amit
 
Share this answer
 
Comments
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900