0

Starting from this post: ASP.NET 2.0 - How to use app_offline.htm

Using powershell to deploy the new version of the site.
Copying app_offline.htm to the site folder.
The offline page is in place. But cannot get the state of the site.
The app (value) and the site (state) are both Started. If I try to copy the files, some .dll is not released.
So, how can I know when the site is offline?

Cristian_S
  • 25
  • 8
  • Since app_offline.htm is not part of IIS pipeline, it is hard to get status with IIS API directly. I think you could try to send webrequest to loop query /app_offline.htm under all sub-applications. If it receive 200, then the site/application might be offline. – Jokies Ding Apr 07 '20 at 07:44
  • It should stop the app, right? And I can get that with powershell. The application is not down, since it display the htm. So, not sure how to get that with powershell. – Cristian_S Apr 07 '20 at 07:53
  • publish to site folder and put app_offline.htm won't stop the app. So it will always remain site:started. That's why I suggest you access URL /app_offline.htm and read status code instead of reading IIS properties. – Jokies Ding Apr 07 '20 at 08:03
  • Thanks for your help! – Cristian_S Apr 07 '20 at 14:01

0 Answers0