Posts

Showing posts from May, 2016

how to get userdetails from Active Directory based on username using asp.net

Introduction: Here I will explain how to get userdetails from Active directory based on username using asp.net Description:  I got requirement like to get user details from Active directory based on username.  For that first create one new website after that right click on website and select  Add Reference  option after that select  System.DirectoryServices  from .NET tab and click ok now  directory services reference has added to our application do you know why we have added this directory service to our application because by using this service we can get userdetails from Active directory. After that design your aspx page like this <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="aspdotnet1.WebForm1" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server">     <title></title> ...