Hi, can anyone help?
I’m trying to get the current logged in Sitefinity user, but no matter what I try I am not getting the user. This is for a custom module that executes on BeginRequest:
public void Init(HttpApplication context)
context.BeginRequest += context_BeginRequest;
void context_BeginRequest(object sender, EventArgs e)
var context = ((HttpApplication)sender).Context;
var user = context.User; // <-- Null
var sUser = SecurityManager.GetCurrentUser(); // return anonymous user
var cUser = ClaimsManager.GetCurrentIdentity(); // returns anonymous identity
I am currently logged into Sitefinity as the admin user, but no matter what, each of the users above do not show me as that user. Using the regular returns null, while both the SecurityManager and ClaimsManager return empty anonymous users.
The site is set to use Claims authentication, what else do I need to do to get the current logged in user?
Thanks in advance