Solved

LDAP win authentication problem?

Posted on 2011-09-15
2
193 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

756 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