Solved

SQL Express 2005 connection issues from remote server.

Posted on 2010-09-17
6
341 Views
Last Modified: 2012-05-10
I am trying to use a pre built website for an internal application to connect to a sql database running on SQL 2005 express ed.

I get the below error on the web page, I know that this is commonly an issue with allowint remote connections, this has been done.  I am able to connect to the sql server via management studio express from the same server in which I am running the website with the below errror.

I have triple checked the username, password, as well as the IP address for the server and the database name.  All is correct, i have even tried using the sa username and password to see if it was a rights thing but all to no avail.

Error:
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)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: 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)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[SqlException (0x80131904): 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)]
   PageCustomizer.PageConfigured(String pagename) +235
   PageCustomizer.LoadControls(ControlCollection& ctrls, String pagename) +119
   CustomizerRoutines.InitializeCustomFields(ControlCollection controls, String pagename) +53
   WebFrameworkPage.SharedLoadPage(String pagename, String& lbox, Page& Page, ControlCollection& Controls, Type errorEnum) +387
   WebFrameworkPage.LoadPage(String pagename, String& lbox, Type errorEnum, Boolean nestedMasterPage) +79
   Login.Page_Load(Object sender, EventArgs e) +87
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4206; ASP.NET Version:2.0.50727.4205
End Error:

Any thoughts would be helpful.
0
Comment
Question by:Binatech
[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 16

Expert Comment

by:carsRST
ID: 33703370
Check to see if TCP/IP is enabled.

From the Microsoft SQL Server 2005 -> Configuration Tools, open the 'Microsoft SQL Server Configuration Manager'.
 
Expand ‘SQL Server 2005 Network Configuration’, and then click ‘Protocols for <Instance Name>’.
<Instance Name> is the name of the instance of Microsoft SQL Express being used by the GFI product.
 
Right-click ‘TCP/IP’ and then click ‘Enable’. The icon for the protocol will change to show that the protocol is enabled.
0
 
LVL 16

Expert Comment

by:carsRST
ID: 33703454
Also, check to make sure you're using the named instance when you connect.  IP number alone won't do it.
0
 

Author Comment

by:Binatech
ID: 33703557
Thanks for your responses,  TCP/IP is enabled, I had checked that before however I just double checked it again and confirmed.  Also Named Pipes is enabled as well.

Tried changing the connection string to show the server name but receive the same error.

Any additional thoughts?
0
Increase Agility with Enabled Toolchains

Connect your existing build, deployment, management, monitoring, and collaboration platforms. From Puppet to Chef, HipChat to Slack, ServiceNow to JIRA, Splunk to New Relic and beyond, hand off data between systems to engage the right people.

Connect with xMatters.

 
LVL 16

Expert Comment

by:carsRST
ID: 33703583
There should be "named instance'  (which is not the server name).  Are you including that when you connect?
0
 
LVL 8

Expert Comment

by:mustaccio
ID: 33703588
Since you are using a Named Pipe connection, make sure that you specify the same pipe name on both the server and the client, or, better yet, switch to TCP/IP connectivity.
0
 
LVL 16

Accepted Solution

by:
carsRST earned 500 total points
ID: 33703604
Your connection would be in this format:

\\computer_name\instance_name
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

690 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