AuthenticateUser returns Unknown

Posted by Community Admin on 04-Aug-2018 18:55

AuthenticateUser returns Unknown

All Replies

Posted by Community Admin on 20-Dec-2012 00:00

Hi,

I am trying to authenticate the user from a web service request and then change its password. I can get the User but when I call AuthenticateUser with the correct password, it returns UserLoggingReason.Unknown. 

UserManager userManager = UserManager.GetManager();
User user = userManager.GetUser(userName);
UserLoggingReason reason = SecurityManager.AuthenticateUser(UserManager.GetDefaultProviderName(), userName, password, false, out user);

To the best of my knowledge, the membership provider and forms authentication are set correctly and I am pointing to the correct database. Any insight would be appreciated.

Thanks,

Matt

Posted by Community Admin on 25-Dec-2012 00:00

Hi Matt,

Would it be possible to try switching to claims authentication and try again to test if you get the same result, please. 

Greetings,
Atanas Valchev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 27-Dec-2012 00:00

Atanas, thanks for responding. I just found out that this code works in another environment, so maybe there's a configuration problem. It looks like our other environment is set to forms authentication. I'll compare the two and see what I can find.

This thread is closed