How could you implement a site-wide "Maintenance mode" for your Asp.Net Core app?
Requirements:
- All controller requests respond with the same static "Maintenance mode" page
- You need to be able to flip a switch in the backend to turn maintenance mode on and off (so it has to happen at runtime)
My current best idea is an actionfilter on all controllers, where I check for the maintenance mode in code (bit in a database) and just return the maintenance mode page if maintenance mode is true.