The request failed with HTTP status 401: Unauthorized.

Discussion in 'ASP .Net Web Services' started by Kevin Burton, Dec 17, 2004.

  1. Kevin Burton

    Kevin Burton Guest

    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, Dec 17, 2004
    #1
    1. Advertising

  2. 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]
    http://www.objectsharp.com/blogs/bruce

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Bruce Johnson, Dec 19, 2004
    #2
    1. Advertising

  3. 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, Dec 19, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sachin
    Replies:
    2
    Views:
    17,900
    Sachin
    Nov 4, 2005
  2. ad
    Replies:
    2
    Views:
    13,534
  3. ad
    Replies:
    0
    Views:
    1,624
  4. Sachin

    The request failed with HTTP status 401: Unauthorized

    Sachin, Nov 4, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    134
    Sachin
    Nov 4, 2005
  5. manika02

    The request failed with HTTP status 401: Unauthorized

    manika02, Mar 29, 2006, in forum: ASP .Net Web Services
    Replies:
    7
    Views:
    209
    geyser hi
    Apr 10, 2006
Loading...

Share This Page