Essentially, what I need to do is, in the event of an external API being unavailable, put up a maintenance page.
I have a monitoring job via hangfire that determines the health status of an external API. In the event of it being down, all users need to be redirected to a simple holding page of some kind.
Traffic on one particular subfolder should be let through, as that will exist as a separate app.
I've looked at the MaintenanceMode package https://github.com/KevinJump/Our.Umbraco.MaintenanceMode, but that didn't seem to work for my particular version of Umbraco 8 (8.7), and if it did, I'm not sure how to control it programatically.
the maintance mode package should work for Umbraco v8.7 (if you have specific errors, give us a shout we can try to fix them).
if you where to control it programatically, I would suggest you inject the MaintenanceModeService into your hangfire job. and then you can turn the maintance mode on / off with the toggleMaintainanceMode call.
Thanks for the reply! Thanks for the information on injecting the maintenancemodeservice! That's great.
I'm not seeing a specific error, and nothing is showing in the logs, but the maintenance page doesn't show up when I browse to the site - it just seems to work as it always did, without showing a maintenance page at all.
Put up a holding page dynamically
Essentially, what I need to do is, in the event of an external API being unavailable, put up a maintenance page.
I have a monitoring job via hangfire that determines the health status of an external API. In the event of it being down, all users need to be redirected to a simple holding page of some kind.
Traffic on one particular subfolder should be let through, as that will exist as a separate app.
I've looked at the MaintenanceMode package https://github.com/KevinJump/Our.Umbraco.MaintenanceMode, but that didn't seem to work for my particular version of Umbraco 8 (8.7), and if it did, I'm not sure how to control it programatically.
Thanks for the help!
Hi,
the maintance mode package should work for Umbraco v8.7 (if you have specific errors, give us a shout we can try to fix them).
if you where to control it programatically, I would suggest you inject the
MaintenanceModeService
into your hangfire job. and then you can turn the maintance mode on / off with thetoggleMaintainanceMode
call.e.g
would turn it on.
Thanks for the reply! Thanks for the information on injecting the maintenancemodeservice! That's great.
I'm not seeing a specific error, and nothing is showing in the logs, but the maintenance page doesn't show up when I browse to the site - it just seems to work as it always did, without showing a maintenance page at all.
is working on a reply...