I want to get value from my Session["userId"] in Application_Error event of Global.asax.
Please help
Check this sample
protected void Application_Error(object sender, EventArgs e) { int userId = 0; if (null != System.Web.HttpContext.Current.Session) { int.TryParse(HttpContext.Current.Session["userId"].ToString(), out userId); } }
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.