Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Web Service + Anon Access, but getting 401 Access Denied Error

Reply
Thread Tools

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

 
 
Alex Washtell via .NET 247
Guest
Posts: n/a
 
      04-05-2005
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>
 
Reply With Quote
 
 
 
 
Mauro Ottaviani [MSFT]
Guest
Posts: n/a
 
      04-05-2005
The 401 you're getting is probably due to the fact that the anonymous user
does not have access to the resource. Check the file ACLs and make sure that
IUSR_%computername% has access to it.

IE is probably performing the authentication using default credentials in
this case (you can check the IIS logs to verify that it starts by sending a
401).

--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Alex Washtell via .NET 247" <> wrote in message
news:...
>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>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows authentication on a Web service returning Access Denied (401). Daniel Bass ASP .Net 5 02-06-2010 08:24 AM
Web Service HTTP 401: Access Denied Problems David Palau ASP .Net Web Services 1 10-11-2005 03:31 PM
Web Service HTTP 401: Access Denied Problems depalau@bemis.com ASP .Net Web Services 0 09-23-2005 09:07 PM
Windows authentication on a Web service returning Access Denied (401). Daniel Bass ASP .Net Security 3 02-11-2004 01:28 PM
XML Web Service Client Deployment Failure: 401 Access Denied Matt ASP .Net 1 01-03-2004 01:40 PM



Advertisments