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.
Worst case, you can add a check to /default.aspx to restart the website if it happends, f.e. something like this:
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);
}