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 42:         End If
Line 43: 
Line 44:         While CurrentPage.ParentID.CompareTo(Guid.Empty) <> 0
Line 45:             _Path.Add(CurrentPage)
Line 46:             CurrentPage = (From p In _Pages Where p.ID = CurrentPage.ParentID Select p).SingleOrDefault

Source File: D:\inetpub\wwwroot\get_on_ca\Web\Layout\MasterPages\BasePage.master    Line: 44

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   ASP.layout_masterpages_basepage_master.MyBase_Init(Object sender, EventArgs e) in D:\inetpub\wwwroot\get_on_ca\Web\Layout\MasterPages\BasePage.master:44
   System.Web.UI.Control.OnInit(EventArgs e) +95
   System.Web.UI.UserControl.OnInit(EventArgs e) +83
   System.Web.UI.Control.InitRecursive(Control namingContainer) +139
   System.Web.UI.Control.InitRecursive(Control namingContainer) +312
   System.Web.UI.Control.InitRecursive(Control namingContainer) +312
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +408


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