Discussion Locked

Problem connect to SQL 2000 from ASP.Net

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Currently, I created ASP.Net Application and using SQL 2000 Database.There are error occurred that connect to SQL 2000 server when run the ASP.Net application.The following error appear

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)
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.Exception: 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)

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.

I would appreciate if anyone can help me to solve this problem!

Thank you
Wilson

2 replies

by onbliss

You mention not being able to connect to a SQL 2000 database. Do you have both SQL 2000 and SQL 2005 installed on the same machine? If you have both, did you try connecting to the SQL 2000 using Query Analyzer or Enterprise Manager?

If you have two instances of SQL Server running, ensure you have the connectionstring set correctly.

by zawmn83

At database server only SQL 2000 is installed.
I can connect this from query analyzer with sa user. But I can't connect from aspx.
my connection string is "Server=192.168.0.100;Database=ABCD;uid=sa;pwd=test;"

When I change server to (local), everything work fine.

This discussion is closed to new replies.