Home » News » Updating your .NET web application? app_offline.htm might be useful

Updating your .NET web application? app_offline.htm might be useful

o-code and Websites written in .NET are an integral part of the Internet world today. However, even such pages ne to be updat regularly, just like any other application. However, there is often a problem with web applications – the application runs continuously, visitors are still using it, and as a result some file y may be lock on the server, which of course also nes to be updat.

What about that?
The easiest way is to turn off the application itself – stop the so-call the application pool associat with it. However, you do not ne to have the necessary permissions and tools for this – e.g. when you use web hosting with another company that only gives you access via the FTP protocol. Fortunately, there is a simple tool for this case: the app_offline.htm file .

If you are looking for the right hosting for your .NET web applications, then be sure to check out our offer of Windows hosting at CZECHIA.COM. We provide a robust solution for application management and deployment, easy access to the FTP interface, we also support DKIM for email accounts, TLS 1.3 and 1.2 or HTTP/3 + QUIC.

How is the app_offline file us?

The moment you ne to take the web application offline, either to update it or for any other reason, just create a file nam ” app_offline.htm ” in the root folder of the application . The easiest way is to create this file on your computer in advance and just upload it to the server using FTP if ne . The file should contain a simple HTML page (no server scripts) that will inform uk mobile phone number data your website visitors that the pages are currently unavailable because (for example) they are undergoing maintenance or an update. When everything  done and you want to start the application again. Just delete the file from the server again or just rename it to soapp_offline-zaloha.htm” so that you can easily use it again in the future.

phone number data

How exactly does it work?
The web server automatically detects the presence of a file nam . App_offline.htm” in the root folder of the web application every time. A request is made to any web page within your site. When it finds such a file, it instructs the application to terminate it. This happens in the same way as if you try to disable its application pool yourself. Here too, if the application is not terminat within. The time limit (given by the setting of the “shutdownTim This situation continues until the “ap” file is again delet or renam from the server.

Could it be automat?

If you have already automat the actual deployment of the pages to the production environment, the creation and re-deletion of the “app_offline.htm” file during the update can also be automat. A detail description would be outside the scope of this article, but in short, you boost your inbound strategy with the latest from content hub ne to prepare the template file “app_ofirst this file is upload to the server under  bw lists the name “app_offline.htm”, then the update itself is perform, and finally the file “app_offline. htm” will be remov again. A detail description can be found on the Microsoft website .

Scroll to Top