Extract NetworkCredential from WindowsIdentity

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Extract NetworkCredential from WindowsIdentity

    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 Guest

  2. Similar Questions and Discussions

    1. using System.Net.NetworkCredential class
      I am using NUnitASP and I have run into problem "faking" user credentials. In my ASP.Net/C# application, I have turned off anonymous access to the...
    2. Trying to pass NetworkCredential to WebService
      Hello, I am running W2k3, Visual Studio 2003, Framework version 1.1.4322. I have one simple asp.net web service and one simple asp.net web app....
    3. Integrated windows authentication and NetworkCredential
      Hi, I have my asp.net webpage configured to use the integrated windows authentication in IIS. I need to use NetworkCredential object to get...
    4. WindowsIdentity ?
      Is there a way to modify WindowsIdentity.Name for System.Security.Principal class at runtime after your app. successfully logs the user on the...
    5. Two Web Services using same NetworkCredential?
      Hi, I've been trying to figure this out all day and thought someone here might be able to help. I have a Windows form app that's using windows...
  3. #2

    Default Extract NetworkCredential from WindowsIdentity

    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 Guest

Posting Permissions

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