Application_AuthenticateRequest global.asax, , , , , , .
protected void Application_AuthenticateRequest(Object sender, EventArgs e)
{
string cookieName = FormsAuthentication.FormsCookieName;
HttpCookie authCookie = Context.Request.Cookies[cookieName];
// check for logged in or not
if (null != authCookie)
{
// is logged in... check if the session needs init
}
}
protected void Application_AuthenticateRequest(Object sender, EventArgs e)
{
// check for logged in or not
if(HttpContext.Current.User != null &&
HttpContext.Current.User.Identity != null
&& HttpContext.Current.User.Identity.IsAuthenticated)
{
// is logged in... check if the session needs init
}
}