Tag - Active Directory

How to use Active Directory Membership Provider in ASP.NET

The ASP.NET membership feature provides secure credential storage for application users.We will use The following:Web page named Login.aspx and another web page named CreateUser.aspxLogin Control.Create User Wizard Control.Steps:1- Configure Forms Authentication in Web.config file.To configure forms authentication, set the <authentication> element's mode attribute to "Forms" and then configure your application's Web.config file as shown...

How to get Active Directory connection string in C#.NET

First you will have to add a reference for System.DirectoryServicesYou must run the application on a machine within the same domain to be able to connect to the Active Directoryusing System.DirectoryServices;private string GetActiveDirectoryConnectionString() { DirectoryEntry root = new DirectoryEntry("LDAP://RootDSE"); using (root) { string dnc = root.Properties["defaultNamingContext"][0].ToString(); string...