Note that App_Offline
is only there to take the ASP.NET part down, it has nothing to do with the IIS site. All non-ASP.NET request -like .htm- will go through the normal IIS pipeline.
That being said, a HTTP 503
is an unavailable service error. The App_Offline.htm
take the site partially offline, it is normal and correct that all ASP.NET request get a 503
response when the site is offline.
Bypass this with a HttpModule or whatever code in the ASP.NET pipeline is not a valid solution.
Since you'are already creating/copying the App_Offline.htm
in your IIS root during maintenance, I'll suggest to add maintenance.htm
as a default document for your /monitor
folder or your IIS site and create/copy a maintenance.htm
file in it during maintenance : then the default page will be reach whatever the ASP.NET site is offline or not.
If your probe is calling the http://servername/monitor/
uri without any page specified, it will work.
You just have to delete it -like you delete your App_Offline
- after the maintenance.