To prevent that halfway-updated websites are shown to users – it is recommendable to set up an IIS maintenance page.
Thus, the user gets reliable information instead of a faulty web application.
You can realize the maintenance note via app_offline.htm in a few steps.
Index
Faulty web application during app update on the IIS
ASP.NET web applications hosted on an Internet-Information Server (IIS) have their own interesting features.
Any administrator or developer responsible this kind of web applications has been faced with the following task:
Single components (or even the whole application) have to be changed to implement necesaary updates.
In most cases these challenges occur:
- Files (DLLs) cannot be deleted because they are in use
- The user will see a faulty or half way-updated website
in case he or she accesses the website during the update
Of course, there are different ways to solve this task. A rather elegant one is to display a maintenance note. Like that, the user does not have the impression to use a faulty application and can adapt to the changes. And you might aggree, that it is better to display a maintenance note than giving the user the impression of a defective website.
Configuring an IIS maintenance page with App_offline.htm
Here are 3 steps for you to set up a user-friendly IIS maintenance page for an update:
- Create a file with the following name in the application directory:
App_offline.htm
- As soon as the file is created, the web application will be shut down and the user only sees the content of the app_offline.htm file.
Create your maintenance web page and put some information about the time and extent of the maintenance work.
- After the work/update has been concluded, just delete or rename the file. You don’t need to create a new file every time.
I just rename it to app__offline.htm (e.g. with double underscore) and switch it back to app_offline.htm when I need it for the next update.
This process is supported by IIS versions for IIS 6.0 and higher.
Leave a Reply
<p>Your email is safe with us.<br/>Information about our <a href="https://activedirectoryfaq.com/contact-us/">data protection policies</a></p>