Re: Calling NetUserGetInfo from ASP.NET app
- From: "Michael D'Angelo" <nospamnmdange@xxxxxxxxxxxxxxx>
- Date: Fri, 26 May 2006 08:57:33 -0400
nah I did get it working.
I can query AD using the LDAP provider just fine. As I said, I cheated by
calling LogonUser, DuplicateToken, and ImpersonateLoggenOnUser ;)
It's only NetUserGetInfo that fails, and I narrowed it down to a permission
issue, because it works when the user is in the Pre-Windows 2000 Compatible
group.
I do it in Global.asax in the PreRequestHandlerExecute event, then call
RevertToSelf in PostRequestHandlerExecute. Seems to do the job. I cas
share the code if you like :)
The main thing is that I needed it to work even with non-IE browsers, and
through a firewall. Two things it doesn't seem regular Kerberos-based
delegation work with...
"Joe Kaplan (MVP - ADSI)" <joseph.e.kaplan@xxxxxxxxxxxxxxxxxxxxxxxx> wrote
in message news:%23iJCMhIgGHA.4976@xxxxxxxxxxxxxxxxxxxxxxx
Good deal. It uses the LSA to do the work for you using the machine's
credentials, so you don't necessarily need to do an RPC on the client's
behalf. It is probably a lot easier than getting delegation working and I
think the LSA also provides some built in caching for you. Of course, the
next time you really do need delegation, you still won't know how to get
it working. :)
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
--
"Michael D'Angelo" <nospamnmdange@xxxxxxxxxxxxxxx> wrote in message
news:%23oOJcZHgGHA.1856@xxxxxxxxxxxxxxxxxxxxxxx
Finally! I got it to work by using TranslateName. Go figure.
Thanks for mentioning it though, I didn't know about that api :)
.
- Follow-Ups:
- Re: Calling NetUserGetInfo from ASP.NET app
- From: Joe Kaplan \(MVP - ADSI\)
- Re: Calling NetUserGetInfo from ASP.NET app
- References:
- Calling NetUserGetInfo from ASP.NET app
- From: Michael D'Angelo
- Re: Calling NetUserGetInfo from ASP.NET app
- From: Michael D'Angelo
- Re: Calling NetUserGetInfo from ASP.NET app
- From: Joe Kaplan \(MVP - ADSI\)
- Re: Calling NetUserGetInfo from ASP.NET app
- From: Michael D'Angelo
- Re: Calling NetUserGetInfo from ASP.NET app
- From: Joe Kaplan \(MVP - ADSI\)
- Re: Calling NetUserGetInfo from ASP.NET app
- From: Michael D'Angelo
- Re: Calling NetUserGetInfo from ASP.NET app
- From: Michael D'Angelo
- Re: Calling NetUserGetInfo from ASP.NET app
- From: Joe Kaplan \(MVP - ADSI\)
- Re: Calling NetUserGetInfo from ASP.NET app
- From: Michael D'Angelo
- Re: Calling NetUserGetInfo from ASP.NET app
- From: Michael D'Angelo
- Re: Calling NetUserGetInfo from ASP.NET app
- From: Joe Kaplan \(MVP - ADSI\)
- Calling NetUserGetInfo from ASP.NET app
- Prev by Date: Re: Calling NetUserGetInfo from ASP.NET app
- Next by Date: Re: ASP.net 2.0 profile provider. Turn on personalization
- Previous by thread: Re: Calling NetUserGetInfo from ASP.NET app
- Next by thread: Re: Calling NetUserGetInfo from ASP.NET app
- Index(es):
Relevant Pages
|