Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 46: 
Line 47:         // Commented for test
Line 48:         if (HttpContext.Current.Session["isLoggedIn"] != null)
Line 49:         {
Line 50:             isLoggedIn = Convert.ToBoolean(HttpContext.Current.Session["isLoggedIn"].ToString());

Source File: e:\inetpub\USDAW-LIVE-20220519-1110\App_Code\USDAW\RepsController.cs    Line: 48

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   RepsController.isRepLoggedIn() in e:\inetpub\USDAW-LIVE-20220519-1110\App_Code\USDAW\RepsController.cs:48
   CMSWebParts_USDAW_Header.Page_Load(Object sender, EventArgs e) in e:\inetpub\USDAW-LIVE-20220519-1110\CMSWebParts\USDAW\Header.ascx.cs:133
   System.Web.UI.Control.OnLoad(EventArgs e) +98
   CMS.ExtendedControls.AbstractUserControl.OnLoad(EventArgs e) +72
   CMS.PortalControls.CMSAbstractWebPart.OnLoad(EventArgs e) +210
   System.Web.UI.Control.LoadRecursive() +111
   System.Web.UI.Control.LoadRecursive() +195
   System.Web.UI.Control.LoadRecursive() +195
   System.Web.UI.Control.LoadRecursive() +195
   System.Web.UI.Control.LoadRecursive() +195
   System.Web.UI.Control.LoadRecursive() +195
   System.Web.UI.Control.LoadRecursive() +195
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4081


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4682.0