Not connceting to remote sqlserver through IIS
am 29.01.2008 09:22:00 von reddy
When I create an websit in VS2005 and run it then it is running on the port
and it is connecting to remote sqlserver. But when I create Virtual directory
in IIS and try to run my website it is not connecting to remote sqlserver. i
am getting the following 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)
Can any one help me in this?
Re: Not connceting to remote sqlserver through IIS
am 29.01.2008 09:46:27 von Sanket Sirotiya
Hi Reddy,
Are you connecting to IIS hosting ASP.NET 2005 and SQL Server 2000 ????
--
Thanks,
Sanket Sirotiya
(sanket.sirotiya@yahoo.com)
"Reddy" wrote in message
news:712FB533-CCE7-4C73-9F23-14BE53927A48@microsoft.com...
> When I create an websit in VS2005 and run it then it is running on the
> port
> and it is connecting to remote sqlserver. But when I create Virtual
> directory
> in IIS and try to run my website it is not connecting to remote sqlserver.
> i
> am getting the following 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)
>
> Can any one help me in this?
>
>
Re: Not connceting to remote sqlserver through IIS
am 29.01.2008 15:23:10 von Norman Yuan
You need to make two things sure:
1. The SQL Server on other computer is accessible (it seems so, since you
can connec to it when run the web app from VS);
2. Which user account is running your web application/IIS. As web app
developer, you should know it and configure the web app runs under
appropriate user account according to security/business requirement. Then
you can tell if the user account has permission to access SQL Server in the
other computer or not. I guess this is where your problem is.
When you run your app inside VS, it is very likely (especially when you use
VS built-in web server), the web app is runing with the identity of your
user account, which has access to the SQL Server. When you move your web app
to IIS (in which computer), depending on how you configure the web app's
security (Windows authentication? Anonymous access? Impersonate?...), the
web app may very likely run as a user account (ASPNET or Network Service, by
default) that does not have access to SQL Server or network resources.
So, you need to ask your self: which user account is used? does it have
access to the SQL Server?
"Reddy" wrote in message
news:712FB533-CCE7-4C73-9F23-14BE53927A48@microsoft.com...
> When I create an websit in VS2005 and run it then it is running on the
> port
> and it is connecting to remote sqlserver. But when I create Virtual
> directory
> in IIS and try to run my website it is not connecting to remote sqlserver.
> i
> am getting the following 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)
>
> Can any one help me in this?
>
>