I have a deployment workflow for an ASP.NET web app which begins with puttin an app_offline.htm
file to the directory of my web app. Despite that, I usually get this error:
The process cannot access the file ... because it is being used by another process.
Indicating that the IIS process is still running despite the fact that the app_offline.htm
file is in place. If I remote desktop to the server and do a manual iisreset
or shut down IIS with its GUI (or just wait a few minutes after manually putting the app_offline.htm
file there, then the workflow works correctly.
So, how long does it take for IIS to shut down after app_offline.htm
is in place?
The default is (up to) 90 seconds. This is defined in the application pool settings that your web application is running under in IIS as "Shutdown Time Limit".
Process Model documentation at Microsoft