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
Looks like during a sql failure there's some kind of an incorrectly cached value that breaks the solution.
According to the call stack, most likely DataLocalizationFacade.DefaultLocalizationCulture returns null, which breaks the sitemap code.
You can add something like this to check it.
if(DataLocalizationFacade.DefaultLocalizationCulture == null) {
  Log.LogError("Default.aspx", "Default culture is null");
}
Not sure where the code fails exactly, may be there're some kind of other warnings/errors in the log file?

Worst case, you can add a check to /default.aspx to restart the website if it happends, f.e. something like this:

try {

...
}
catch(NullEreferenceException) {
  HostingEnvironment.InitiateShutdown();
  Response.Redirect("/?", true);
}

Viewing all articles
Browse latest Browse all 2540

Trending Articles



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