473,769 Members | 3,557 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ActiveDirectory MembershipProvi der 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 (ActiveDirector yMembershipProv ider,
ActiveDirectory MembershipUser, 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.N ame)

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

Nov 19 '05 #1
3 1639
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.goo glegroups.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 (ActiveDirector yMembershipProv ider,
ActiveDirectory MembershipUser, 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.N ame)

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.Director yServices. However, I cannot seem to get the new
classes in ASP.NET 2.0 to work. I want to avoid using the
DirectoryServic es 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.Director yServices. However, I cannot seem to get the new
classes in ASP.NET 2.0 to work. I want to avoid using the
DirectoryServic es 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
1403
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 been initialized. Can you guys point me to something that tells me what I'm doing wrong, please? bool checkItOut; string ls_retVal = ""; ActiveDirectoryMembershipProvider obj = new ActiveDirectoryMembershipProvider(); try
2
4875
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 different error. I consistently receive the following message after submitting credentials from the login page: Parser Error Message: Object reference not set to an instance of an object. Source Error:
0
1906
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 "ActiveDirectoryMembershipProvider" in the web.config file. But my restriction is that I do not want to give the "connectionUsername" and "connectionPassword" in the web.config file. I want to update this 2 attributes at runtime in the Login1_LoggingIn event handler, so...
18
4671
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 name="ADConnectionString" connectionString="LDAP://192.168.32.129/CN=users,CN=testdns,DC=test,DC=com" /> </connectionStrings>
0
1628
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 controller in a new forest named VSERVER00 running Windows Server 2003 R2 Standard. The second is an application server running IIS in the same domain, named VSERVER01 also running Windows Server 2003 R2 Standard. The domain is VDOMAIN.local. I have...
5
2881
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 that if I put a wrong username or password in the connection string the login control tells me this, and doesn't throw the other exception. Any ideas? Thanks in advance
0
1495
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 method of the Membership user class. What I have done is create all the AD schema entries. I have pointed my web.config file properly at these items. Yet I still get the "Attribute schema mappings for bad password answer tracking must be...
0
1063
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 Unavailable" message is returned. If I switch the provider back to SQLServer everything works fine. If I create a new simple Web Application and just add a Login.aspx page and Default.aspx page, and nothing else, and add a Login Control everything...
3
1785
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
2171
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 environment is a windows xp laptop. I am trying to avoid running a domain controller on my laptop. What would be the easiest way to develop and test my application without running a domain controller on my laptop?
0
10206
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10035
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9851
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7403
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3556
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2811
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.