W
Web Developer
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 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!