Solved

LDAP win authentication problem?

Posted on 2011-09-15
2
187 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
Comment Utility
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
Comment Utility
yes. everything looks all fine.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

Suggested Solutions

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

772 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

11 Experts available now in Live!

Get 1:1 Help Now