|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ActiveDirectoryMembershipProvider ASP.NET 2.0I 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? 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? > 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. 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. > >
Other interesting topics
submit button - custom javascript
IIS 6.0 Event 1074 SqlDataSource - strange error (to me at least) ;-) Set Label Font? Menues with v1.1? HTML mail does not work? Which account neets permission to read the Registry key. SKMMenu and SSL Permission for bin folder: ASP.NET app deployed under a web site grant folder write permission |
|||||||||||||||||||||||