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