?
Solved

SQL Express 2005 connection issues from remote server.

Posted on 2010-09-17
6
Medium Priority
?
343 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
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
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 2000 total points
ID: 33703604
Your connection would be in this format:

\\computer_name\instance_name
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

Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
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…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
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…

770 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