Monday, February 20, 2012

Remote Connection Fails with Web Service

Hello-
I am having a problem with a Web Service written in Visual Studio 2005.
I have a typed dataset that I created using the Visual Studio 2005
Data Source tool. This retrieves its data from a SQL Server 2000
database. My client calls a web service which calls a business
component to retrieve the typed dataset (i.e. Client --> Web Service
--> Business Component).
Whenever I put the web service between my client and my business
component I get the following error:
Server was unable to process request. --> 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)
If I do not put my web service in between my client and business
component, I do not get this error (i.e. Client --> Business
Component).
I have made sure that my SQL 2005 has Remote Connections enabled with
both Named Pipes and TCP/IP.
I don't understand why putting a web service between my client and
business component is making this error appear or how to remedy the
issue. Any help would be much appreciated!
-DrewI found the problem. In my web.config I had to add the following
configuration: <identity impersonate="true" />.
-Drew

No comments:

Post a Comment