Web Service + Anon Access, but getting 401 Access Denied Error

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



I have a simple webservice that just returns a string. The security for this is set to windows authentication in IIS (XP Professional) and anonymous access is also turned on.

When I access the webservice from IE there is no problem, it returns the string fine. However, when I create a simple console application to use this service and output the string, I get a 401 Access Denied error.

I have tried the method of setting the default credentials, but this isn't suitable (I can explain why but is not relevant), and the key issue here is that anonymos access IS enabled, so I shouldn't have to set the credentials anyway, surely?

This was working fine until I came back to it after a couple of weeks, and I am unsure what I could have changed in my settings in Windows. As far as I can see this appears to be an IIS problem, rather than an application one.

Any help is greatly appreciated, thanks,

Alex

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>Nz74j70aE0SfGiHcLfpbqw==</Id>
.



Relevant Pages

  • Re: Configuring Windows-based Authentication and UrlAuthorization
    ... In IIS, I had set the bindings for the site to http://SERVER. ... you can add web.config file with Windows Authentication ... Is it possible to disable anonymous access just for the Admin ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: web server database access problem
    ... Are you using windows authentication or SQL ... authentication to access SQL server? ... Problem lies in IIS I think. ... >> in the connection string to make this work. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Problems with writing to a file on IIS 6.0
    ... Is there any disadvantage of using the windows authentication over ... will use Network Service ... And i also need to use the anonymous access to provide access without ... IIS). ...
    (microsoft.public.inetserver.iis.security)
  • RE: Authentication problems
    ... and want Windows Authentication being ... As I leave Anonymous Access checked, ... | problem getting on the website. ... Q187506 List of NTFS Permissions Required for IIS Site to Work ...
    (microsoft.public.inetserver.iis.security)
  • Re: Configuring Windows-based Authentication and UrlAuthorization
    ... I tried to switch the whole site to Windows Authentication. ... Could you please tell me how you configure your website on IIS? ... create Virtual Directory for the Admin folder? ... If you want to enable Anonymous access for public part and use Integrated ...
    (microsoft.public.dotnet.framework.aspnet.security)