AuthenticateUser() throws null reference
I'm trying to use the below method
SecurityManager.AuthenticateUser("Default", "username", "password", true);
but it always throws null reference as
"Object reference not set to an instance of an object."
Can anyone explain about this?
Hello,
Please try one of the other overloads of the method:
Telerik.Sitefinity.Security.Model.User user;
SecurityManager.AuthenticateUser(
"Default"
,
"username"
,
"password"
,
true
,
out
user);
Hi Velizar,
Still i'm fighting hard with the same issue, i'm passing a valid credentials and also i can successfully login using the same one in the back end login page.
Currently i'm working on Sitefinity 8.0.5710 version.
Below are the Exception details FYR
Note : Authenticate() method is being executed in a cs file, i'm calling it from an installer.cs of one of the controls.
Hi,
Unfortunately the stack trace does not really provide enough information on the issue. To investigate further please open a support ticket so we can provide you with a way to get your project to us and debug it.
Regards,
Velizar Bishurov
Telerik
Hi Velizar,
Actually what i'm trying to do is, creating pages in the installer part of a widget.
It has to happen at the application starts event, at the moment a particular widget is installed using installer.cs (rewriting the config for layout/toolbox).
Is it a possible scenario, or is there any way we can achieve it?
Hello,
I am sorry to say that what you are trying to achieve is not possible on the Application_Start event as at this point no manager or provider has initialized yet.
One option to workaround this would be to create a scheduled task for one minute later for example.
Regards,
Velizar Bishurov
Telerik