Professional Web Applications Themes

The Request Failed with HTTP Status 401: Access Denied - ASP.NET Web Services

I have a webservice that returns a simple string. The security for this is set to windows authentication in IIS (XP Professional) and anonymous access is . When I access the webservice from IE there is no problem. But when I try access it from my windows application I get the above error. When I look at the IIS log it show the same user name for both requests. IE request has the status 200 and the Windows app has the status 401. After seeing another related post, I added the pre-authenticate and now I get: 405: Method not allowed. ...

  1. #1

    Default The Request Failed with HTTP Status 401: Access Denied

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

    When I access the webservice from IE there is no problem. But when I try
    access it from my windows application I get the above error.

    When I look at the IIS log it show the same user name for both requests. IE
    request has the status 200 and the Windows app has the status 401.

    After seeing another related post, I added the pre-authenticate and now I
    get: 405: Method not allowed.

    What could be the problem?

    Thanks,
    James


    James Guest

  2. #2

    Default Re: The Request Failed with HTTP Status 401: Access Denied

    I have resolved the issue. I don't know if this is permanent.

    The solution:

    1. Set the authentication to anonymous access.
    2. Right click on the web reference server name and update the reference.
    Now the errors are gone.
    3. Set the authentication back to Windows.
    4. Now Windows authentication works.

    Thanks,
    James


    James Guest

  3. #3

    Default The request failed with HTTP status 401: Access Denied

    I have a webservice that allows all users to access it but am receiving
    an access denied message.
    IIS virtual directory for application is set to allow annonymous access
    with windows authentication.
    The annonymous user id is an active directory account
    USPHC\COR089SAPDM.
    I've entered the password in the password field and unchecked the allow
    windows to control password checkbox.

    When I change the user in the virtual directory to IUSR_XX, the
    webservice works fine.
    Here is the web.config for the webservice section.
    <location path="WebService/User/pdmUsersV1R0.asmx">
    <system.web>
    <authorization>
    <allow users="*"/>
    </authorization>
    </system.web>
    </location>
    The everyone group is authorized for nt security to read/execute on the
    folder.

    Any help would be appreciated.
    Thank you,
    Clem

    jdhavo@yahoo.com Guest

  4. #4

    Default RE: The request failed with HTTP status 401: Access Denied

    Anonymous users are usually used with the built-in IUSR anonymous account.
    The account may have several other priveleges that you might have to find out
    and manually set if you are using an AD account.

    It is better to leave it with anonymous. If you are changing it for setting
    the context for accessing some resource in your ASP code, you should consider
    using .NET impersonation and not change the IIS account.

    Regards,
    Pandurang

    --
    blog: www.thinkingMS.com/pandurang


    "com" wrote:
     
    Pandurang Guest

Similar Threads

  1. The request failed with HTTP status 401: Unauthorized.
    By Kevin Burton in forum ASP.NET Web Services
    Replies: 3
    Last Post: July 18th, 10:55 PM
  2. Replies: 0
    Last Post: April 18th, 02:36 PM
  3. request failed with HTTP status 407: Proxy Authentication Required
    By Scott O'Donnell in forum ASP.NET Web Services
    Replies: 0
    Last Post: February 14th, 12:23 AM
  4. The request failed with HTTP status 403: Access Forbidden
    By Baohua Li in forum ASP.NET Web Services
    Replies: 0
    Last Post: February 6th, 07:05 PM
  5. request failed HTTP status 417
    By Paul Gilberti in forum ASP.NET Web Services
    Replies: 0
    Last Post: January 1st, 11:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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