AsifCh Posted July 18, 2005 Posted July 18, 2005 Hi, I want to create a login page which authinticates the users from the active directory. The requirement is that if the user is loged in to the windows through the active directory account then he has not to provide the user name and password other wise he has to provide the both things. The user's active directory group is maped to the application's roles. First i have to check the user's Active Directory Group and then get the role of the user for application. Can you provide me the best solution for how to do this because I am not sure how to authinticate the users in the login page. Regards, Quote Asif Raza Ashraf Senior Software Engineer Electronic Solutions Pakistan Islamabad
Administrators PlausiblyDamp Posted July 18, 2005 Administrators Posted July 18, 2005 (edited) If you have IIS configured to use Windows Authentication (and remove allow anonymous) and in your web.config have the authentication mode set to Windows then it should automatically use your Domain for authentication. If a person is logged in then no prompting should occur, if they are accessing the site from outside your domain then a login prompt should automatically be displayed. Once logged in you can check the group membership with code similar to If User.IsInRole("") Then 'Member of role End If Edited April 4, 2007 by PlausiblyDamp Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
AsifCh Posted July 20, 2005 Author Posted July 20, 2005 Hi, thanks for the reply. You are right that I can check the user's role through user.isInRole but the problem is that Their are more then 100 different groups in the active directory and each group has some specific permissions so using the User.isInRole is not appropriate at this situation because I have to loop through the whole list of roles, so i want a solution that i can get the user's active directory directly. Thanks, ----- Quote Asif Raza Ashraf Senior Software Engineer Electronic Solutions Pakistan Islamabad
jamilehy Posted January 28, 2009 Posted January 28, 2009 Hello I also need to login using active directory. Please let me know if you find any solution. thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.