The request failed with HTTP status 401: Unauthorized

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




I am trying to implement security on a Web Service. The web service is a
simple asmx "hello world" Web service. A test web application makes a call to
the web service. Please find the configuration of my Test Web Service and
Test Website below:
1) Web Service Settings:
-Anonymous Authentication disabled for security reasons
-Windows Authentication enabled
- I have given "All" permissions to a "WindowsService" account on the Web
Service folder in IIS

2) WebSite settings:
- identity impersonate = true;
- I impersonate the identity of "WindowsService" Account so that it is a
valid user to call the web service.

When I call the WebService using the WebSite I get the Unauthorized Access
error. For Debugging purposes, I have even given "Everyone" permissions to
the WebService but I still get the same error. The only way the error goes is
when I enable "Anonymous" access but I do not want to do that for "security"
reasons. My understanding is with "Anonymous" access, anybody in the network
can access the web service.

Please advice. I have been stuck here for quite some time now.

Thanks,
Manika

.



Relevant Pages

  • Which generic SOAP web services client to use?
    ... I've noticed that one can use IE to test web pages (by going on ... I tried googling for it but was able to find only 'online' options. ... (can't use online tools - since my web service is hosted inside the ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Setting web service location dynamically
    ... I feel slightly embarassed for not figuring that out by myself;) ... > In visual studio change the property 'URL Behavior' of the web service ... test and development environment for my web ... >> and a web service (The test web application connects to the test web ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Setting web service location dynamically
    ... for the web application web service communication. ... test and development environment for my web ... >> and a web service (The test web application connects to the test web ... >> Is it possible to let the web services location be set in e.g. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Setting web service location dynamically
    ... test and development environment for my web application ... > and a web service (The test web application connects to the test web ... > Is it possible to let the web services location be set in e.g. Web.config? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Setting web service location dynamically
    ... test and development environment for my web application ... and a web service (The test web application connects to the test web ...
    (microsoft.public.dotnet.framework.aspnet)