473,320 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

ActiveDirectoryMembershipProvider ASP.NET 2.0

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?

Nov 19 '05 #1
3 1612
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
"Arnel" <ar******@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.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?

Nov 19 '05 #2
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.

Nov 19 '05 #3
There is a nice blog on thet here at:-
http://blogs.msdn.com/gduthie/archiv...17/452905.aspx
Hope that helps
Patrick

"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.

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rik Brooks | last post by:
I am trying to write a change password routine using the new ActiveDirectoryMembershipProvider. My code is below. I'm getting an exception saying that my ActiveDirectoryMembershipProvider has not...
2
by: JD Qixcle | last post by:
I have been following several threads between David Thielen and Luke Zhang regarding the ActiveDirectoryMembershipProvider as used for ASP.NET 2.0 Forms authentication, but I receive a slighly...
0
by: Parag Mahajan | last post by:
Hi, I am using the membership provider class, "System.Web.Security.ActiveDirectoryMembershipProvider". I am using Login Server control and attaching the already configured...
18
by: Glenn Eastlack | last post by:
I have been trying to use ASP.NET 2.0 built-in Membership Providers. Particularly the ActiveDirectoryMembershipProvider. My web.config looks like this: <connectionStrings> <clear/> <add ...
0
by: Nehpets | last post by:
I'm trying to setup a web site that uses active directory for user authentication under asp.net 2.0. For testing, I have separately installed two virtual servers. The first is a domain...
5
by: Gonza | last post by:
Hi all, i'm getting an "object reference not set to an instance of an object" exception when trying to login using the asp:login control and ActiveDirectoryMembershipProvider. What's strange is...
0
by: mannyl | last post by:
Hopefully one of you have worked with the .net 2.0 ActiveDirectoryMembershipProvider or some varient they of. please reply to rnbergren@dmacc.edu What I want to reference is the resetpassword...
0
by: zeplynne | last post by:
Having trouble using ActiveDirectoryMembershipProvider with one specific website. When attempting to login to the site, after a long period of time (about 2 - 3 minutes), "Server Application...
3
by: rroden | last post by:
C:\WINDOWS\assembly \WindowsSystem.Web.Security.ActiveDirectoryMembershipProvider isn't being installed with .net 2.0 or 3.0 on any of my systems. What am I doing wrong?
4
by: Max2006 | last post by:
Hi, I am using ActiveDirectoryMembershipProvider for authentication. In my development environment I don't have any Active Directory available for development and test. Basically my development...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.