Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: V3.2 default.aspx Line 50 'Object Ref Not Set' Reason ?

$
0
0
ok, so Ive been doing some testing on the above happenings.

Whenever the SQL database is not available for some reason, after the SQL error clears - the above error happens with the full stack trace:
Source Error: 

Line 48: 
Line 49:   var sitemapNavigator = new SitemapNavigator(conn);
Line 50:   PageNode homePageNode = sitemapNavigator.HomePageNodes.FirstOrDefault();
Line 51:                 
Line 52: 

Source File: d:\C1\wwwroot\default.aspx    Line: 50 


[NullReferenceException: Object reference not set to an instance of an object.]
   Composite.Core.WebClient.Renderings.Page.PageStructureInfo.GetScopeKey(PublicationScope publicationScope, CultureInfo cultureInfo, UrlSpace urlSpace) +51
   Composite.Core.WebClient.Renderings.Page.PageStructureInfo.GetMap(PublicationScope publicationScope, CultureInfo localizationScope, UrlSpace urlSpace) +150
   Composite.Core.WebClient.Renderings.Page.PageStructureInfo.GetMap() +86
   Composite.Core.WebClient.Renderings.Page.PageStructureInfo.GetSiteMap() +5
   Composite.Core.Implementation.SitemapNavigatorImplementation..ctor(DataConnection connection) +174
   Composite.Core.Implementation.ImplementationFactory.CreateSitemapNavigator(DataConnection connection) +25
   Composite.Data.<>c__DisplayClass2.<.ctor>b__0() +21
   Composite.Core.Implementation.ImplementationContainer`1.CreateImplementation() +22
   Composite.Core.Implementation.ImplementationContainer`1.get_Implementation() +15
   Composite.Data.SitemapNavigator.get_HomePageNodes() +7
   ASP.default_aspx.Page_Init(Object sender, EventArgs e) in d:\C1\wwwroot\default.aspx:50
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnInit(EventArgs e) +91
   System.Web.UI.Page.OnInit(EventArgs e) +12
   System.Web.UI.Control.InitRecursive(Control namingContainer) +140
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +480
Does anybody know why this happening?
and have a way of automatically catching the fault and correcting it ?

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>