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

Ask a Question related to ASP.NET Web Services, Design and Development.

  1. #1

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

    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 ([url]http://www.dotnet247.com/[/url])

    <Id>Nz74j70aE0SfGiHcLfpbqw==</Id>
    Alex Washtell via .NET 247 Guest

  2. Similar Questions and Discussions

    1. Access Denied - Network Service vs Local Service
      I have been struggling with my ASP.NET (V1.1 sp1) websites getting an 'Access Denied' message. I have track down the problem (I think) to the IIS...
    2. DPAPI Service Start access is denied
      Hi, Following the procedures for "How To:Use DPAPI (User Store) from ASP.NET with Enterprise Services" from Building Secure ASP NET Applciations...
    3. Web Service Access Denied with MS Word
      I have a web service that uses MS Word to do mail merge and printing. It works fine when running on my development machine. But when I deploy it...
    4. XML Web Service Client Deployment Failu401 Access Denied
      I am new to web service. My goal is to create a simple web service, and a web service client to test the web service. When I created a web...
    5. Web Service Credentials - Access Denied
      I am having problems passing the credentials from the current user to the Web Service. THANK YOU in advance for any help!! Web Service and Web...
  3. #2

    Default Re: Web Service + Anon Access, but getting 401 Access Denied Error

    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" <anonymous@dotnet247.com> wrote in message
    news:uzufcOfOFHA.508@TK2MSFTNGP12.phx.gbl...
    >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 ([url]http://www.dotnet247.com/[/url])
    >
    > <Id>Nz74j70aE0SfGiHcLfpbqw==</Id>

    Mauro Ottaviani [MSFT] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139