Thursday, November 19, 2015

Take IIS offline for Mainx

If you need to take an IIS server down then all you need to do is park an html page.,
app_offline.htm at the IIS root.  This will block all requests coming to that server.


The app_offline.htm File


So now that we've decided we want to take an application offline, how do we do it? If we've got access to the server we could stop the web site via the IIS management console, but in most shared hosting scenarios you don't have that kind of access to the server. The other shortcoming of that approach is that many developers publish via FrontPage Server Extensions or WebDAV, both of which need the web site to be running in order to make changes.
Enter the app_offline.htm file. The app_offline.htm file is a special file that ASP.NET 2.0 watches for in the root of an application. If the file exists, then ASP.NET shuts down the application and sends the contents of the file back to the user's browser for any new requests to dynamic pages in the application. This means that users are basically locked out of the application and you're free to make any changes that need to be made before removing the file and letting them back in.

Source

http://stackoverflow.com/questions/300416/iis-redirect-all-requests-to-one-page

No comments:

Post a Comment