Extract NetworkCredential from WindowsIdentity

Discussion in 'ASP .Net Security' started by Web Developer, Dec 7, 2004.

  1. I'm using the Windows Integrated Authentication scheme for my web apps and
    web services. When my web applications make calls to the web services I need
    to attach the NetworkCredential of the requesting user to the web service
    proxy client.

    I can achieve this by impersonating the requesting user, and setting the web
    service proxy's Credentials member as follows:
    SoapHttpClientProtocol.Credentials =
    System.Net.CredentialCache.DefaultCredentials

    However, I don't always want to impersonate the requesting user since I have
    to grant them access to systems folders like "Temporary ASP.NET Files" etc.

    It seems like I should be able to create a NetworkCredential from the
    WindowsIdentity, but the WindowsIdentity only exposes a "Name" member - no
    password.

    Another option is to manually impersonate the user, set the Credentials
    member of the proxy client, and then revert back, but this seems pretty
    kludgy.

    Does anyone know how to derive a NetworkCredential from a WindowsIdentity?

    Thank you!
     
    Web Developer, Dec 7, 2004
    #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. Jay Douglas
    Replies:
    4
    Views:
    730
    Jay Douglas
    Mar 6, 2004
  2. IveCal

    NetworkCredential

    IveCal, Apr 17, 2006, in forum: Java
    Replies:
    6
    Views:
    4,311
    Oliver Wong
    Apr 20, 2006
  3. =?Utf-8?B?WUs=?=
    Replies:
    3
    Views:
    5,090
    *Busy*
    Mar 24, 2010
  4. Replies:
    3
    Views:
    1,729
  5. Web Developer

    Extract NetworkCredential from WindowsIdentity

    Web Developer, Dec 15, 2004, in forum: ASP .Net Security
    Replies:
    0
    Views:
    145
    Web Developer
    Dec 15, 2004
Loading...

Share This Page