Upgrade to IIS7 Server Causing Database Connectivity Issues

Last Reply on May 15, 2013 02:11 AM By Mudassar

Posted on May 14, 2013 08:12 AM

Let me begin by saying I am not familiar with ASP, IIS, or SQL Server. However, I am working on a redesign for a client who's current site was designed in ASP, on a Windows System, running IIS6 and SQL Server 2005.

The redesign is being done in PHP, and I was told the only way to run PHP in this environment is to upgrade to IIS7, so I gave GoDaddy the go-ahead to do the upgrade. I was told the upgrade would take 24 hours, but it ended up taking a week (not sure what happened).

Immediately after the upgrade went into effect, the current website (ASP) ceased functioning. The website generates an error message, which can be seen at the primary homepage (www.luckyladypecans.com).

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)

I realize this is somewhat of a general connectivity error, but I've done some research, and this seems to be related to a firewall issue that commonly occurs when upgrading to IIS7. If anyone has any advice or experience with this type of issue, I would love to hear some opinions on what I can do.

I have already tried re-creating the database, with Remote Access enabled. That proved unsuccesful. As I said, I'm not experienced with IIS or SQL Server; I work with MySQL, Apache, and PHP, so try to keep things in lamens terms for me!

Thank you!

Posted on May 14, 2013 08:13 AM

1. Where is your SQL Server installed?

2. If it is on Remote Machine, then is it made available publicly over Internet

Posted on May 14, 2013 09:26 AM

The website and SQL server are both hosted through GoDaddy. From what I've been told, they are on seperate servers. The SQL server can be accessed through an admin address, but is not accessible through "localhost" as is usually the case. Not sure if that's what you're asking.

Also, upon further inspection, I've found that there are 3 database connections in the website's configuration file (I've asterik'd out the usernames and passwords):

<add key="DBConnectionUSC" value="Data Source=**.secureserver.net;Initial Catalog=unitedsafes;Persist Security Info=True;User ID=**;Password=**"/>
<add key="DBConnection" value="Data Source=**.hostedresource.com;Initial Catalog=luckysql;Persist Security Info=True;User ID=**;Password=**"/>
<add key="DBConnectionDixie" value="Data Source=www.tsgs.net;Initial Catalog=dixie;Persist Security Info=True;User ID=**;Password=**"/>

I'm not sure why there are 3, and I have asked my client to make some phone calls and figure out what their connection is with these other 2 companies. I'm not completely sure which of these connections is throwing the error.

Posted on May 14, 2013 11:23 AM

I've come to discover that at least one of those extra connection strings (Dixie) are simply leftover from a previous website. Apparently, this website was duplicated from a previous project and modified to suit the new client. I have commented out the DBConnectionDixie line, but I'm still getting a connection error.

Line 64:         Me.pDB = New DBConnector()
Line 65: Me.pDB.Conn.Open()
Line 66:         Me.pCMPrefs = New CMPreferences(Me.pDB)

Line 65 is throwing the error. Is this DBConnector() class a generic ASP/VB class, or is this a custom class he created? I'm thinking if I could locate that class, maybe I could discern which of these connection string is needed, and which can be commented out, or how I should structure the connection string.

Posted on May 15, 2013 02:11 AM

You also need to check what connection your new site is using. It may be possible that your code might be referencing multiple connection strings and you have updated only one