Solved

SQL Server Error

Posted on 2011-02-18
6
219 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C# MVC Insert Multiple Row into DB 2 61
Replication failure 1 20
How can I find this data? 3 24
create dataset from text files to go on winforms gridview 3 25
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

763 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