Re: programmatically login using LDAP and impersonation
- From: "Joe Kaplan" <joseph.e.kaplan@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 13 Nov 2006 16:09:00 -0600
Is it possible that you can configure the IIS App Pool identity to use the
domain account you need to log in to both SQL and AD? This is by far the
easiest way and requires no impersonation. Authentication will use Kerberos
as long as proper SPNs for all of the identities are configured, otherwise
it will fail over to NTLM.
Alternately, you can call LogonUser (see SDK docs of
WindowsImpersonationContext for sample) and impersonate or potentially
configure the ASP.NET identity element to impersonate a specific identity.
However, I'd stay away from both of those if possible as you then need to
store the credentials of the identity yourself instead of letting IIS do it
in the metabase.
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
--
<bob> wrote in message news:20061113163952rlalley1@xxxxxxxxxxxx
I'm on a network system that has some pretty strict policies that I can
not change. My criteria is to use forms login for extranet users, against
a sql server database and impersonate an account that is on an intranet
Active Directory.
Saying it a different way, I need to impersonate an intranet Active
directory account that must be authenticated using Kerberos
authentication.
I'm stuck at this point trying to figure out how to programticly
impersonate the account that will be used to access the sql server. It
will only allow windows authentication, our system uses LDAP windows auth,
that runs thru a kerberos portal.
*sigh* The only thing I can think of is to programaticly log in the
intranet account, get the authentication ticket assign that ticket to the
user, then using the login name and password they provided check the
database and determine authorization from there. Is there another way, am
I missing something? If I'm not missing something where can I get the
information that I need?
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
.
- References:
- Prev by Date: Re: programmatically login using LDAP and impersonation
- Next by Date: Re: programmatically login using LDAP and impersonation
- Previous by thread: Re: programmatically login using LDAP and impersonation
- Index(es):
Relevant Pages
|