Professional Web Applications Themes

The request failed with HTTP status 401: Unauthorized. - ASP.NET Web Services

I have a web service that has been working before but now I am getting: The request failed with HTTP status 401: Unauthorized. This is to the localhost and I am a member of the administrators group for this machine so I am not sure what is unauthorized nor do I understand how to find out why I am getting this error (exception). Any ideas? Thank you. Kevin Burton...

  1. #1

    Default The request failed with HTTP status 401: Unauthorized.

    I have a web service that has been working before but now I am getting:

    The request failed with HTTP status 401: Unauthorized.

    This is to the localhost and I am a member of the administrators group for
    this machine so I am not sure what is unauthorized nor do I understand how to
    find out why I am getting this error (exception). Any ideas?

    Thank you.


    Kevin Burton
    Kevin Burton Guest

  2. #2

    Default Re: The request failed with HTTP status 401: Unauthorized.

    Does the virtual directory that hosts the web service allow anonymous
    access? If not, then you have two choices. Configure the virtual
    directory to allow anonymous access. Or assign the
    System.Net.Credentials.DefaultCredentials to the Credentials property on
    the proxy object that you're using the call the web service.

    Hope that helps.

    Bruce Johnson [.NET MVP]
    [url]http://www.objectsharp.com/blogs/bruce[/url]

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Bruce Johnson Guest

  3. #3

    Default Re: The request failed with HTTP status 401: Unauthorized.

    Does the webservice use imperonation?
    If not, then the process for it would run under the identity of "ASPNet"
    account. (Not your account as administrator).
    Does the code of web service use resources (file access, database access,
    etc.) on the machine? If it does so, then you need to give ASPNet account
    the needed permissions on them (if you are not using impersonation).

    Regards
    Mohamed El Ashmawy
    MEA Developer Support Center
    ITWorx on behalf of Microsoft EMEA GTSC

    Mohamed El Ashmawy Guest

  4. #4

    Default The request failed with HTTP status 401: Unauthorized.

    Hi,
    I have seen lot of posts regarding this error: 'The request failed
    with HTTP status 401: Unauthorized.' - but none worked in my situation.

    I have a webservice which is called by a windows service running in the
    same machine. My webservice once again connects to a third party's
    webservice. Anonymous access is switched off and Integrated
    authentication is enabled for my webservice. The web.config has both
    authentication set to windows and impersonate set to true. The
    usergroup which the windows service calls my webservice has been given
    permissions through the Permissions wizard in IIS. The IIS version is
    6.0 running on Windows Server 2003 with service pack 1 installed.

    The point here is we have two sets of servers and both the servers have
    identical setup. The webservice call gets through in the 1st server,
    but the 2nd server fails with 'The request failed with HTTP status 401:
    Unauthorized.' error. Spent almost 3 days on comparing the settings in
    both the servers and looks both have same configuration.

    Any clues? Help is much appreciated.

    Thanks,
    Hari.

    rh.krish@gmail.com Guest

Similar Threads

  1. The Request Failed with HTTP Status 401: Access Denied
    By James in forum ASP.NET Web Services
    Replies: 3
    Last Post: March 22nd, 10:28 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