Home All Groups Group Topic Archive Search About

ActiveDirectoryMembershipProvider ASP.NET 2.0

Author
10 Oct 2005 8:25 PM
Arnel
I have a web app which uses the new ASP.NET 2.0 login control to
authenticate against active directory.  Now, I would like to use the
new namespaces (ActiveDirectoryMembershipProvider,
ActiveDirectoryMembershipUser, MembershipUser, Membership, etc) to
retrieve the logged in user properties available.  I have been able to
get the logged in username when using Forms auth. with the following
code.  Unfortunately, it doesn't work when I use Windows auth:

MembershipUser LoginName = Member.GetUser(User.Identity.Name)

Does anyone know how to retrieve the various properties available for
AD users?

Author
11 Oct 2005 1:24 AM
Patrick.O.Ige
For it to work for Windows auth you would have to set that on IIS
Go to IIS >Security and uncheck Anonymous logon and check integrated Windows
Auth.
Hope that helps
Patrick


Show quoteHide quote
"Arnel" <arnel***@gmail.com> wrote in message
news:1128975959.694971.150010@f14g2000cwb.googlegroups.com...
> I have a web app which uses the new ASP.NET 2.0 login control to
> authenticate against active directory.  Now, I would like to use the
> new namespaces (ActiveDirectoryMembershipProvider,
> ActiveDirectoryMembershipUser, MembershipUser, Membership, etc) to
> retrieve the logged in user properties available.  I have been able to
> get the logged in username when using Forms auth. with the following
> code.  Unfortunately, it doesn't work when I use Windows auth:
>
> MembershipUser LoginName = Member.GetUser(User.Identity.Name)
>
> Does anyone know how to retrieve the various properties available for
> AD users?
>
Are all your drivers up to date? click for free checkup

Author
11 Oct 2005 8:41 PM
Arnel
Thanks, Patrick.  But I've already set this.  I have no problem
authenticating against AD, and I can retrieve user account properties
using System.DirectoryServices.  However, I cannot seem to get the new
classes in ASP.NET 2.0 to work.  I want to avoid using the
DirectoryServices namespace because I would like to utilize the
ADmembership provider in 2.0.
Author
31 Oct 2005 6:02 AM
Patrick.O.Ige
There is a nice blog on thet here at:-
http://blogs.msdn.com/gduthie/archive/2005/08/17/452905.aspx
Hope that helps
Patrick

Show quoteHide quote
"Arnel" wrote:

> Thanks, Patrick.  But I've already set this.  I have no problem
> authenticating against AD, and I can retrieve user account properties
> using System.DirectoryServices.  However, I cannot seem to get the new
> classes in ASP.NET 2.0 to work.  I want to avoid using the
> DirectoryServices namespace because I would like to utilize the
> ADmembership provider in 2.0.
>
>

Bookmark and Share