User is not an extranet user

Vote:
 
I get this error message when trying to login -> LDAP through episerver Login.ascx unit. this is the trace: "EPiServer.Security.UnifiedPrincipal..ctor(UserSid sid) +794 junis.units.Login.LoginUser(String username, String password) +53 junis.units.Login.LoginButton2_Click(Object sender, ImageClickEventArgs e) +44" and this is where i think it goes wrong: public bool LoginUser(string username, string password) { bool valid; string redirectUrl = null; UserSid user = UserSid.Load(username); if (user != null) { UnifiedPrincipal principal = new UnifiedPrincipal(user); valid = principal.CheckPassword(password); if (valid) { redirectUrl = SetupSession(username, password, (UnifiedPrincipal)principal); return true; } else { return false; } } else return false; Does anyone have a clue to what im doing wrong here? thx for support. Regards
#17666
Mar 25, 2008 19:34
Vote:
 
Its solved now. IPrincipal principal = AuthenticationProvider.Authenticate(this, username, password); //UnifiedPrincipal principal = new UnifiedPrincipal(user); //valid = principal.CheckPassword(password); //if (valid) if(principal.Identity.IsAuthenticated) { redirectUrl = SetupSession(username, password, (UnifiedPrincipal)principal); return true; }
#18504
Mar 25, 2008 19:43
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.