Problem With Web Service

  • Thread starter Thread starter Wayne Wengert
  • Start date Start date
W

Wayne Wengert

I created a simple web service that returns a dataset containing the city
and state when the GetZIP function is called with a zip code as the
parameter. When I test the web service by opening the asmx file I get an
error "System.Data.SqlClient.SqlException: SQL Server does not exist or
access denied."

I am using the same database connection string that my aspx pages do and I
have double checked that it is correct. Is there some special permission
required for an asmx page to access an sql server?

Wayne
 
Hi,

Please answer few questions below:

Do the web service is implemented in a different project or in the same web
application?

Do you use windows authentication for connecting to the sql server?

Do you use impersonation in the web application?

If the web service is implemented in a different project and you use windows
authentication and impersonation in the web application, check if you have
enabled the impersonation in the web service application.
 
Saravanan K V said:
Hi,

Please answer few questions below:

Do the web service is implemented in a different project or in the same
web
application?
The aspx file is an imdepenent file - not part of the project
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top