Solved

SQL Server Error

Posted on 2011-02-18
6
218 Views
Last Modified: 2012-05-11
"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"

I got a call from our Customer Service department saying a customer was having problems accessing a part of our website (they got the error message above). The CSR also got the error message. I, however, do not receive this message and everythign works fine.

How could some people see this error, and I cannot (another person in a cube next to me doesn't get the error either)?
0
Comment
Question by:infotechelg
  • 4
6 Comments
 
LVL 4

Expert Comment

by:rocky_lotus_newbie
ID: 34928935
The error indicates connectivity issues, Please check if the SQL Server service is running and if you are able to connect to the SQL Server locally. Also, check if the connection string is pointitng to the right server name and db name.

Below link has more details on how to troubleshoot the connectivity problems:
http://blogs.msdn.com/b/sql_protocols/archive/2005/12/22/506607.aspx

Thanks,
0
 
LVL 9

Assisted Solution

by:gdupadhyay
gdupadhyay earned 200 total points
ID: 34929702
There is no specific reason for this error. Some time due to firewall or not able to find server
instance. Please read the following posting, might be help you.

What is the OS on server?

http://blogs.msdn.com/b/sql_protocols/archive/2007/05/13/sql-network-interfaces-error-26-error-locating-server-instance-specified.aspx

http://social.msdn.microsoft.com/forums/en-US/sqlgetstarted/thread/9354bf59-15a2-49f4-bc1f-f45371e054fc/

check the configuration for remote connection:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
0
 

Author Comment

by:infotechelg
ID: 34929975
On the database server or the Web server? Both are Windows Server 2003.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Accepted Solution

by:
infotechelg earned 0 total points
ID: 34930064
gdupadhyay,

One of the first things your first link says is "First of all, you get this error message only if you are trying to connect to a SQL Server named instance. For default instance, you never see this." This applies to my database server: there is no instance name.

The database and web server are on the same network. The database server is behind the firewall, but it allows the web server to access it. None of the other database driven pages on the Website are giving me problems, just this page.

And, like I said before, it works fine on my computer and on other's, but that error message appears for other people. I just don't see how that's possible. If there's a connectivity problem, it should be a problem for everyone, right?
0
 

Author Comment

by:infotechelg
ID: 34930110
Holy crap...I think I just figured out the issue.

I my ServerConfig.config file that the code accesses to obtain query strings, there are query strings in there for production, staging, and development.

The correct query string is pulled depending on my domain name. So if i'm running the website as http://localhost:1223, it will pull the dev connection string. If the site is being ran as http://mysite/ it will pull the staging connection string. If it's being ran as www.mysite.com, it will pull the production connection string.

The ServerConfig.config file is not accounting if someone does mysite.com (without the www.)! So, it's defaulting to the development connection string, whish DOES have a named instance.

I bet if I add to my .config file, mysite.com, the problem would go away.

Sorry to waste everyone's time on this, but i'm 99% sure this is the problem.
0
 

Author Closing Comment

by:infotechelg
ID: 34959270
So, the solution by gdupadhyay wasn't the correct solution to my problem, but his link guided me to the internal issue.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C# Desktop Application 3 54
Expression Evaluater 3 38
What Does This C# Code Block Do? 5 57
Substring works but need to tweak it 14 16
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question