Link to home
Start Free TrialLog in
Avatar of dkim18
dkim18

asked on

LDAP win authentication problem?

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
ASKER CERTIFIED SOLUTION
Avatar of jagssidurala
jagssidurala
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dkim18
dkim18

ASKER

yes. everything looks all fine.