• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 219
  • Last Modified:

MS SQL Server 2005 + 2008

I already had vs2005 installed and the sql server that comes with it. I also installed ms sql server studio manager.

I got a project that is done in vs2008, and i got the database files as well: .mdf, .ldf

I installed vs2008 and it installed a bunch of features with it that it needs and i believe that it also installed the 2008 sql server though not sure.

i attached the database using the studio manager (right click, attach, browse...)
now i ran the website and when it tries to connect to the database iget the error below.
i think its trying to find the database on the 08 db server.. ? and i attached it to the 05 db server?

your help is greatly appreciated.

thanks in advance.

System.Data.SqlClient.SqlException was unhandled by user code
  Message="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)"
  Source=".Net SqlClient Data Provider"
       at DAL.GetUser.getUser() in C:\Users\Rogue\Desktop\TechLink\TechLink\DAL\GetUser.cs:line 40
       at BLL.LoginUser.Login() in C:\Users\Rogue\Desktop\TechLink\TechLink\BLL\LoginUser.cs:line 29
       at TechLink.Login.btn_click_Click(Object sender, ImageClickEventArgs e) in C:\Users\Rogue\Desktop\TechLink\TechLink\TechLink\TL\Login.aspx.cs:line 30
       at System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e)
       at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
1 Solution
Raja Jegan RSQL Server DBA & ArchitectCommented:
>> provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified

Make sure your SQL Server is up and running.
Also check whether your Browser Service is up and running if you are trying to connect to a named instance.
Check out the links below which contains some other additional possible causes:

salalimosAuthor Commented:
Figured out the problem, had a typo in the server name:D

thanks for your comment.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now