Thursday, February 9, 2012

ASP.NET 2.0 and connection to remote SQL 2000 server

Hi
I created ASP.NET 2.0 web application that uses SQL Server 2000 database and
it works perfectly when website and Sql server were on local machine.
Then I installed application on production server. Database is placed on
another server.
I received the error:
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote
connections. (provider: Named Pipes Provider, error: 40 - Could not
open a connection to SQL Server)
Why it thinks I am trying to connect to SQL Server 2005 ? There is no any
2005 server on remote server!
This is my connection string:
Server=servername;Database=SOX;User ID=userxxx;Password=******;
Query Analyzer and Enterprise Manager connect perfectly (when installed on
production server) to database server! Then I created small console
appplication which uses the same data layer as web application (and
connection string ) - it connected to remote database too! Only ASP.NET
2.0 application couldn't connect to remote Sql server 2000.
Can anyone help?If there is no SQL Server 2005 installed on the server then
it looks like it's hitting the wrong server. Have you tried
using the IP address?
Double check the connection string and server name in the
connection string. On the IIS server, check for aliases and
entries in the host file that could cause it to go to the
wrong server. Log onto the server where IIS is installed and
ping the SQL Server box by name. Make sure the IP address
for the SQL Server box is correct and pointing to the
correct server.
-Sue
On Sat, 5 Aug 2006 23:06:33 +0300, "Mitya Mitriev"
<aaa@.stopspam.org> wrote:

>Hi
>I created ASP.NET 2.0 web application that uses SQL Server 2000 database an
d
>it works perfectly when website and Sql server were on local machine.
>Then I installed application on production server. Database is placed on
>another server.
>I received the error:
>An error has occurred while establishing a connection to the server.
>When connecting to SQL Server 2005, this failure may be caused by the
>fact that under the default settings SQL Server does not allow remote
>connections. (provider: Named Pipes Provider, error: 40 - Could not
>open a connection to SQL Server)
>Why it thinks I am trying to connect to SQL Server 2005 ? There is no any
>2005 server on remote server!
>This is my connection string:
>Server=servername;Database=SOX;User ID=userxxx;Password=******;
>Query Analyzer and Enterprise Manager connect perfectly (when installed on
>production server) to database server! Then I created small console
>appplication which uses the same data layer as web application (and
>connection string ) - it connected to remote database too! Only ASP.NET
>2.0 application couldn't connect to remote Sql server 2000.
>Can anyone help?
>

No comments:

Post a Comment