Last post Nov 17, 2011 07:37 PM by gww
Nov 16, 2011 12:23 PM|ismailae|LINK
Please am new in this terrain.Am developing an intranet Application for my company but i want to User to be Automatically once the user successfully logs into he/her system.
I want the application to get the user's details from Active Directory once he/she enters the Intranet Url.
Please i need this Guys.
Nov 16, 2011 02:51 PM|N_EvilScott|LINK
If you are using .NET 3.5 or higher then your job will be an easy one. You can use the PrincipalContext in the System.DirectoryServices.AccountManagement namespace, to work your way around have a look at this tutorial that shows you how to search for Groups,
Users, and other objects such as Security Groups etc...
Nov 17, 2011 04:12 AM|kushal.dwivedi|LINK
Use Windows authentication in IIS to authenticate intranet users.
To get user information from AD, you can either use System.DirectoryServices or System.DirectoryServices.AccountManagement namespace.
Nov 17, 2011 07:37 PM|gww|LINK
In your global.asax file you can setup your WindowsAuthentication_Authenticate if you want to use windows authentication or WindowsAuthentication_Authenticate if you want to use Forms Authentication. I prefer to use forms authentication.
In IIS you will want to enable windows authentication and disable annonmous access. This will expose the currently logged on user to the application Identity that you can then use to search active directory.
If you use forms authentication you can setup roles in two ways. Either create a custom role in the database and add users to them or you can use Active Directory groups and check the user membership in those, to add users to roles for acces to pages and