Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 HELP!

Author  Topic 

Lorna70
Starting Member

19 Posts

Posted - 2010-04-29 : 09:09:00
I have a client who's aspx script to displaying the following error:

Please Contact Admin. System.Data.SqlClient.SqlError: 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

The .aspx files are sitting on the same server as SQL Server 2005 Express. I have checked the web.config file and the Server instance name is the correct one and so it the username and password. Apparently this script has always run without errors so has only recently started falling over. I did a simple test file to make sure it is the connection to the server which is the problem and it doesn't work either. Any advice as to what else to check on the server would be greatly appreciated.

DBA in the making
Aged Yak Warrior

638 Posts

Posted - 2010-04-29 : 09:16:17
Is the service running?

------------------------------------------------------------------------------------
Any and all code contained within this post comes with a 100% money back guarantee.
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2010-04-29 : 20:55:50
How are you trying to connect to the instance? SQL Server 2005 Express installs by default as a named instance - so you need to access it using the named instance (e.g. SERVER\SQLExpress).

Also, if the SQL Browser is not running you won't be able to connect to a named instance by referencing the name. Without the SQL Browser, you have to specify the port in addition to the name or IP address.
Go to Top of Page
   

- Advertisement -