Friday 8 August 2014

Use windows credential for your Web application



Login to your Web application using your windows Username and Password

Add reference of      System.DirectoryServices.AccountManagement.dll


using System.DirectoryServices.AccountManagement;

PrincipalContext pc = new PrincipalContext(ContextType.Domain, "universal");

bool b = pc.ValidateCredentials("Username","Password");