In one of my project (web application) I have to authenticate user using Active Directory. I am using System.DirectoryServices.DirectoryEntry to validate user using username and password.
But, along with this I also need to validate user based on his emails id and password. Is there any Tutorial on help present to validate user based on Domain email id and password.
I am thinking about using System.DirectoryServices.AccountManagement. PrincipalContext to extract username based on email id provided and then validate user based on username and password.
But, if there already any API available for this, then I will use that.
Please provide your view on this.
Regards,
Ajay
knowledge brings wisdom !!!! OH REALLY
Please remember to "Mark as Answer" the responses that resolved your issue.
validate user based on his emails id and password. Is there any Tutorial on help present to validate user based on Domain email id and password.
For this issue, how about using membership your application, it create an ASP.NET Web page that contains
TextBox controls to obtain the user name and password (and, optionally, the user's e-mail address), and then use the
CreateUser Membership API method to programmatically create the new user. see: How To: Use Membership in ASP.NET 2.0
http://msdn.microsoft.com/en-us/library/ff648345.aspx
Please let me know if there is anything that I can do to help.
Best regards,
Angie
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
390 Points
118 Posts
Active directory Authentication using Email id instead of username
Nov 24, 2014 12:21 AM|Ajay230784|LINK
Hi,
In one of my project (web application) I have to authenticate user using Active Directory. I am using System.DirectoryServices.DirectoryEntry to validate user using username and password.
But, along with this I also need to validate user based on his emails id and password. Is there any Tutorial on help present to validate user based on Domain email id and password.
I am thinking about using System.DirectoryServices.AccountManagement. PrincipalContext to extract username based on email id provided and then validate user based on username and password.
But, if there already any API available for this, then I will use that.
Please provide your view on this.
Regards,
Ajay
Please remember to "Mark as Answer" the responses that resolved your issue.
All-Star
32817 Points
3815 Posts
Re: Active directory Authentication using Email id instead of username
Nov 28, 2014 02:06 AM|Angie xu - MSFT|LINK
HI Ajay,
For this issue, how about using membership your application, it create an ASP.NET Web page that contains TextBox controls to obtain the user name and password (and, optionally, the user's e-mail address), and then use the CreateUser Membership API method to programmatically create the new user. see: How To: Use Membership in ASP.NET 2.0 http://msdn.microsoft.com/en-us/library/ff648345.aspx
Please let me know if there is anything that I can do to help.
Best regards,
Angie
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
67 Points
373 Posts
Re: Active directory Authentication using Email id instead of username
Dec 10, 2014 02:41 PM|phamster|LINK
What I would do is return the email address from the Domain and compare it to what is enter. See code below: