Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

LDAP win authentication problem?

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unable to use host header for secured websites using a single IP address 2 29
edit .asp files 5 31
jquery + C#.net radiobuttonlist 3 30
asp.net mvc 2 22
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

856 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