Solved

LDAP win authentication problem?

Posted on 2011-09-15
2
188 Views
Last Modified: 2012-05-12
Hi,

I am trying to set up a windows authentication  on my asp.net web application.
I have a security group on active directory which is called, RedTeam and BlueTeam.
I am following this article and I can't make it run.
How to authenticate against the AD by using forms authentication and c# (http://support.microsoft.com/kb/316748)

I am using the exact code in this article.
1) My agency's server name goes like this, myagency.xy.abc.
From my computer, I used nslookup and found something like abc001.myagency.xy.abc.
I guess I am not sure exactly if I got the correct name.

String adPath = "LDAP://myagency.xy.abc"; //Fully-qualified Domain Name


2) It errors out from this line.
Object obj = entry.NativeObject; <===
What does this do? Do I need this?
Without this, it still errors out saying that my userid and/or password are incorrect.

3) Do I use this SAMaccount?
search.Filter = "(SAMAccountName=" + username + ")";
I want to check if this is userid is in AD and my security group (ReadTeam or BlueTeam)

Do I use this instead?
objectClass = User

4) I am testing this from the VS2010 and it is telling me that my userid and/or pw are incorrect.
How can I fix? This should be something easy but I can't make it work.
can you helP?

5) all I want to do is I want to authenticate users against the security group on active directory.
I want to use their windows ID & PW and check it against ldap, if they are in the group, let them access the application.
Thanks
0
Comment
Question by:dkim18
2 Comments
 
LVL 12

Accepted Solution

by:
jagssidurala earned 500 total points
ID: 36545503
Have you modified the authentication mode to 'Forms' in web.config.

please check it once and also check IIS settings as mentioned in the article given.
0
 

Author Comment

by:dkim18
ID: 36546861
yes. everything looks all fine.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now