Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL Express 2005 connection issues from remote server.

Posted on 2010-09-17
6
Medium Priority
?
344 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
Independent Software Vendors: 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!

 
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

Independent Software Vendors: 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

If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

636 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