The System.Web.HttpContext.Current.User.Identity.Name
is returning "null."
I am definitely logged in.
How can this be solved?
protected override void OnActionExecuting(ActionExecutingContext filterContext)
{
base.OnActionExecuting(filterContext);
if (Session["FirstName"] == null)
{
string loginName = System.Web.HttpContext.Current.User.Identity.Name;
string networkId = loginName.Split('\\')[1];
Session["FirstName"] = new AD_Utility().FirstName(networkId);
}
ViewBag.FirstName = Session["FirstName"];
}