Set the User property on your HttpContext to your logged in user. Like this (pulled from my CustomPrincipal implementation)...
In your Global.asax:
protected void Application_PostAuthenticateRequest(Object sender, EventArgs e)
{
/// Code to get user
...
ContextHelper.GetHttpContextBase().User = user;
}
In another helper class:
public static class ContextHelper
{
public static HttpContextBase GetHttpContextBase()
{
return new HttpContextWrapper(HttpContext.Current);
}
}
Then in your BaseController:
public abstract class BaseController : Controller
{
public new HttpContextBase HttpContext { get; private set; }
protected virtual new ICustomPrincipal User
{
get { return HttpContext.User as ICustomPrincipal; }
}
}