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.DirectoryServices.DirectoryServicesCOMExce ption: Logon failure: unknown user name or bad password.”
PrincipalContext pc = new PrincipalContext(ContextType.Domain, “TEST1″)
On Sentence
UserPrincipal.FindByIdentity(pc, userName);
Please find the code of GetPrincipalContect as given below.
Expand|Select|Wrap|Line Numbers
- public PrincipalContext GetPrincipalContext()
- {
- PrincipalContext oPrincipalContext = new PrincipalContext(ContextType.Domain, “TEST1″);
- return oPrincipalContext;
- }
Kindly provide some help.