Friday, March 23, 2012

Frustrating Error connecting to SQL 2000 from IIS with .NET 2.0

I am getting the following error when connecting to SQL 2000 from IIS with .NET 2.0.

It works perfectly with the Test Server that comes with VS 2005.

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.Data.SqlClient.SqlException: 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)

Any suggestions|||

AndsX wrote:

Any suggestions


This question has been asked and resolved by others previously. Ithink you should use the Search feature on these forums to search forthis string and see if previous resolution(s) help you:
"provider: Named Pipes Provider, error: 40"
|||I was expecting this answer :) anyways i made a search on the forum before posting the question . but i could find any resolution to this poblem. Most of them where do with SQL 2005.|||Same problem here. I posted a similar issue a week ago and didn'treally find any resolution. Anyone seen this. Connecting toSQL 2000 right?

Stephen|||

stephenzr wrote:

Same problem here. I posted a similar issue a week ago and didn't really find any resolution. Anyone seen this. Connecting to SQL 2000 right?

Stephen

After lot of tries i found an answer to this problem. In the DB Connection String use integreted Security and add Impersonate Identiy in the config . Hope his solves ur problem also

|||Thanks, I will try that. Are you using SQL username/password authentication or windows auth?

Stephen|||

No go. Do we really need to impersonate. That seems like a significant config change just to go from 1.1 to 2.0?

Stephen

No comments:

Post a Comment