I am trying to hook up with Active directory to get the Group of the user using System.Director yServices.Accou ntManagement.
When I am running the Application from VS2010 it Authenticate user and Display the Group as well.
But when I am browsing application from IIS 5.1 it showing error while checking the group.
“System.Directo ryServices.Dire ctoryServicesCO MException: Logon failure: unknown user name or bad password.”
PrincipalContex t pc = new PrincipalContex t(ContextType.D omain, “TEST1″)
On Sentence
UserPrincipal.F indByIdentity(p c, userName);
Please find the code of GetPrincipalCon tect as given below.
Kindly provide some help.
When I am running the Application from VS2010 it Authenticate user and Display the Group as well.
But when I am browsing application from IIS 5.1 it showing error while checking the group.
“System.Directo ryServices.Dire ctoryServicesCO MException: Logon failure: unknown user name or bad password.”
PrincipalContex t pc = new PrincipalContex t(ContextType.D omain, “TEST1″)
On Sentence
UserPrincipal.F indByIdentity(p c, userName);
Please find the code of GetPrincipalCon tect as given below.
Code:
public PrincipalContext GetPrincipalContext()
{
PrincipalContext oPrincipalContext = new PrincipalContext(ContextType.Domain, “TEST1″);
return oPrincipalContext;
}
Kindly provide some help.