IIS 5 & IIS 6
"Named Pipes Provider, error: 40" while connecting from IIS 6.0 to SQ...
Last post Aug 21, 2007 08:56 AM by firstname.lastname@example.org
Aug 21, 2007 06:44 AM|Nazza|LINK
Hi, I receive a strange error while connecting to a site developed using ASP.NET 2.0.
What I have used:
- ASP.NET 2.0 (Visual Studio 2005) to deploy the site
- SQL Server 2000 DB on a remote server
Many applications connect (without any problem) to this DB by the same connection string.
On page_load event of the site homepage, a connection is opened using the connection string.
I try the site within Visual Studio 2005 and everything is OK.
I publish the site and the result is:
"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)"
Looking on the web, I found this error is related to remote connections using SQL Server 2005, but I use SQL Server 2000.
The only difference is that in the first case I connect by the Visual Studio Development Web Server, in the second IIS 6.0.
Any idea ?
Aug 21, 2007 08:56 AMemail@example.com|LINK
Nothing you can do in IIS will fix this. Check the SQL forums at
www.asp.net. And fix your connection string.