Re: asp.net + c# -> HttpContext.Current.User + directoryentry
- From: Nicopilami <n.chaussard@xxxxxxxxx>
- Date: Mon, 17 Mar 2008 03:35:26 -0700 (PDT)
On 14 mar, 15:30, "Joe Kaplan"
<joseph.e.kap...@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
You don't have Windows credentials of the logged on user to impersonate when
you use forms authentication and the user's password is not available to you
in general as it is only captured during the login. In order to get those
credentials, you'll need to capture them during the forms auth login and
store them somewhere in a safe way so they can be retrieved later.
You could also consider switching to Windows auth instead.
Joe K.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"http://www.directoryprogramming.net
--"Nicopilami" <n.chauss...@xxxxxxxxx> wrote in message
news:6f29c9d4-01cc-4265-9630-5f814ac625f4@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> Hi everybody
i'm trying to open a directory services connection under the
users' (who is navigating the webpage) credentials, like
impersonation, but i don't succeed, could you help me ?
the problematic line is the following :
DirectoryEntry Ldap = new DirectoryEntry(ConnexionAD,
ADusername, ADpassword);
actually, i would like to retrieve ADusername and ADpassword from
HTTPcontext.current.user becaus the user is authenticated by forms. Is
there a way for doing that ?
thx by advance
Nico
ok, that's what i've finally done, stored into the session variables,
as encrypted variable; it's not very beautiful, but it works well :o)
thx
bye
Nico
.
- References:
- asp.net + c# -> HttpContext.Current.User + directoryentry
- From: Nicopilami
- Re: asp.net + c# -> HttpContext.Current.User + directoryentry
- From: Joe Kaplan
- asp.net + c# -> HttpContext.Current.User + directoryentry
- Prev by Date: RE: SetPrincipalPolicy in ASP.NET
- Next by Date: Re: asp.net impersonation
- Previous by thread: Re: asp.net + c# -> HttpContext.Current.User + directoryentry
- Next by thread: Access to video file
- Index(es):
Relevant Pages
|
|