Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
We have a case where umbraco fails to boot with a message like :
Boot failed: Umbraco cannot run. See Umbraco's log file for more details.
Is there a way to deal with this, like display an error message to user ?
We tried using OnApplicationError / Application_Error events but those events are not triggered.
Thank you
Hi Alexandre
Anything revealing in the log file?
Have a look in app_data/logs/
the trace log file for today will have lots of info about startup failure...
There is a stand alone Log Viewer to help view the logs: https://www.microsoft.com/store/apps/9N8RV8LKTXRJ
Usually it's something injected into something that isn't registered with DI, but the logs should help!
regards
Marc
Hi Marc, thanx for the information but I am not trying to find the cause but rather how do deal with it if I ever have a similar problem in the future. How can I bypass the standard error message and rather display a friendly message to the user ?
Ahh I understand
Looking here: https://github.com/umbraco/Umbraco-CMS/blob/b0ef69a4ec1dcdefc6a102c82e17837ef3e37482/src/Umbraco.Core/Runtime/CoreRuntime.cs
if any of those setup methods fail, then the caught exception throws the BootFailedException. (like 163)
var bfe = e as BootFailedException ?? new BootFailedException("Boot failed.", e);
so that might be before or after composition...
this sets the RuntTimeState as BootFailedException and this module here:
https://github.com/umbraco/Umbraco-CMS/blob/853087a75044b814df458457dc9a1f778cc89749/src/Umbraco.Web/UmbracoInjectedModule.cs#L429
seems to explain why there is no nice 500 page.
The BootFailedException is here:
https://github.com/umbraco/Umbraco-CMS/blob/853087a75044b814df458457dc9a1f778cc89749/src/Umbraco.Core/Exceptions/BootFailedException.cs
hmm, that's probably not helping much!
Did you ever figure out how to display a custom page on boot failure Alexandre?
Hi David, no we did not find a way to do this. Good luck.
Does it set a http error code?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to write a component that handles a failure to boot
We have a case where umbraco fails to boot with a message like :
Is there a way to deal with this, like display an error message to user ?
We tried using OnApplicationError / Application_Error events but those events are not triggered.
Thank you
Hi Alexandre
Anything revealing in the log file?
Have a look in app_data/logs/
the trace log file for today will have lots of info about startup failure...
There is a stand alone Log Viewer to help view the logs: https://www.microsoft.com/store/apps/9N8RV8LKTXRJ
Usually it's something injected into something that isn't registered with DI, but the logs should help!
regards
Marc
Hi Marc, thanx for the information but I am not trying to find the cause but rather how do deal with it if I ever have a similar problem in the future. How can I bypass the standard error message and rather display a friendly message to the user ?
Ahh I understand
Looking here: https://github.com/umbraco/Umbraco-CMS/blob/b0ef69a4ec1dcdefc6a102c82e17837ef3e37482/src/Umbraco.Core/Runtime/CoreRuntime.cs
if any of those setup methods fail, then the caught exception throws the BootFailedException. (like 163)
var bfe = e as BootFailedException ?? new BootFailedException("Boot failed.", e);
so that might be before or after composition...
this sets the RuntTimeState as BootFailedException and this module here:
https://github.com/umbraco/Umbraco-CMS/blob/853087a75044b814df458457dc9a1f778cc89749/src/Umbraco.Web/UmbracoInjectedModule.cs#L429
seems to explain why there is no nice 500 page.
The BootFailedException is here:
https://github.com/umbraco/Umbraco-CMS/blob/853087a75044b814df458457dc9a1f778cc89749/src/Umbraco.Core/Exceptions/BootFailedException.cs
hmm, that's probably not helping much!
Did you ever figure out how to display a custom page on boot failure Alexandre?
Hi David, no we did not find a way to do this. Good luck.
Does it set a http error code?
is working on a reply...