Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Extract NetworkCredential from WindowsIdentity

Reply
Thread Tools

Extract NetworkCredential from WindowsIdentity

 
 
Web Developer
Guest
Posts: n/a
 
      12-07-2004
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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to get a NetworkCredential object from the current =?Utf-8?B?WUs=?= ASP .Net 3 03-24-2010 08:34 PM
Does NetworkCredential itself encrypt user credentials? antonyliu2002@yahoo.com ASP .Net 3 07-09-2007 07:42 PM
NetworkCredential IveCal Java 6 04-20-2006 02:42 PM
Extract NetworkCredential from WindowsIdentity Web Developer ASP .Net Security 0 12-15-2004 05:51 PM
Using NetworkCredential then a Redirect to the site requiring the credientails Jay Douglas ASP .Net 4 03-06-2004 04:36 PM



Advertisments
 



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