0

I get the following error whilst trying to connect from an ASP.NET web application from a particular server to an instance of SQL Server 2005 on a different server.

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)

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

We have eliminated each of these (there is no firewall).

Running the application on a different web server (in the same network) and it can connect to the database. Similarly, running the database on a different server, and the application can see it. It appears to be a problem between these two servers.

The problem occurred at random. It was working one minute, then not, and hasn't been working since. Nothing was installed or changed (as far as I can work out) on the server.

Any ideas?

Thanks

8
  • 1
    can you connect using SQL Management Studio? Have you tried connecting by IP address instead of qualified server name? Commented Feb 3, 2011 at 12:05
  • @Xhalent, yes I can connect using via SQL Management Studio (both from the database server, and another server on the same network (although not the web server, it doesn't have management studio)). Commented Feb 3, 2011 at 12:21
  • @Xhalent, And if you mean put the IP address in the connection string instead of the name, yes I have tried that. Thanks. Commented Feb 3, 2011 at 12:22
  • what credentials are you using in connection string in the asp.net application? Username/password or windows creds based on the process? If the latter, I'd check what account the app pool is running in - if is the default then that may be your issue. Let me know. Commented Feb 3, 2011 at 12:24
  • I am using username/password. The connection string looks like this: Commented Feb 3, 2011 at 12:29

1 Answer 1

2

Have you tried connecting using an IP address rather than a qualified server name in the connection string? Sometimes the remote server can not be resolved but the IP address can be, depending on domain/network dns setup.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for your help. It appears this server has recently had its name changed, and that appears to be confusing something somewhere. Still not quite sure what. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.