HTTP Status 401 -- WebServer calling WebService

Discussion in 'ASP .Net Web Services' started by Howard Hoffman, Sep 10, 2003.

  1. I am trying to 'flow' a Windows Identity from an IE Browser to a Web Server
    to an App Server (hosted by ASP.NET, exposing WebService interface).
    Everything is within the same firewall / network.

    I'm seeing the identity flow from Browser to Web Server, but it doesn't flow
    over to the App Server / Web Service.

    I had thought this would work, but perhaps I'm mistaken. It *does* work if
    everything is on the same machine.

    Machine A is W2K Advanced Server, with AuthorsWebClient ASP.NET Web Server
    application.
    The IIS virutal directory Directory Security tab is setup to *not* allow
    anonymous access. Integrated Windows Authentication is checked.

    The web.config file has <identity impersonate="true"/> and <authentication
    mode="Windows"/>.

    In the web server, I make a call to a web service running on Machine B.
    Before calling the web service, I set

    Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;

    where 'Proxy' is the VS.NET Generated (via WebReference) proxy for the web
    service.

    Machine B is running XP. It's got AuthorsWebService, an ASP.NET Web
    Service application. The IIS virtual directory Directory Security tab is
    setup
    to *not* allow anonymous access. Integrated Windows Authentication is
    checked.

    The web.config file of the Web Service has <identity impersonate="true"/>
    and <authentication mode="Windows"/>.

    If I disallow anonymous access to the Web Service virtual directory, I get
    HTTP 401 errors at the point where Machine A calls the web service on
    Machine B. If I allow anonymous access to the Web Service virtual
    directory, I get in to the Web Service, but I have a Windows Principal
    with an Identity that has an empty Name value.

    Especially in light of

    http://support.microsoft.com/default.aspx?scid=kb;EN-US;811318

    I'm confused. Can anyone tell me whether I can flow identity across the
    web server to the web service (across machines)?

    Thanks in advance,

    Howard Hoffman
    Howard Hoffman, Sep 10, 2003
    #1
    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. =?Utf-8?B?UG1jZw==?=

    HttpWebRequest & (401) Unauthorized http status code

    =?Utf-8?B?UG1jZw==?=, Jun 21, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    2,385
    =?Utf-8?B?UG1jZw==?=
    Jun 21, 2004
  2. Sachin
    Replies:
    2
    Views:
    17,861
    Sachin
    Nov 4, 2005
  3. ad
    Replies:
    2
    Views:
    13,493
  4. ad
    Replies:
    0
    Views:
    1,614
  5. Impersonate user for webservice status 401

    , Dec 5, 2006, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    142
    Catalin T
    Dec 7, 2006
Loading...

Share This Page