I loved the features of using app_offline.htm on my ASP.NET WebForm based sites.
Upload the file and your app is immediately "offline". Snappy.
Now that I'm using MVC 2, I noticed that this no longer works.
Is there a way to get this behavior in ASP.NET MVC 2 like it did in WebForms?
If not, what alternative do you prefer?
The way app_offline. htm works is that you place this file in the root of the application.
The App Offline file ( app_offline. htm ) is used by the ASP.NET Core Module to shut down an app. If a file with the name app_offline. htm is detected in the root directory of an app, the ASP.NET Core Module attempts to gracefully shut down the app and stop processing incoming requests.
app_offline.htm works on MVC sites. You need to make sure it's 512 bytes or larger. I use it all the time when updating a couple of MVC sites.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With