简体   繁体   中英

How to take Asp.net website offline in iis 7.5

I have an ASP.NET website, but I would like to show an "under maintenance" page when my clients try to visit the site. Does anyone know how to do this?

If you are running your application within a .NET 4.0 application pool (IIS 7.0 or IIS 7.5) or your web site is configured as an ASP.NET 4.0 web site (IIS 6.0) and would like to show your clients an "under maintenance" page for a limited time, the easiest way is to put a file named app_offline.htm in your web site's root folder. Then your application will be taking offline and the clients will be served with app_offline.htm page whatever their requests are.

When you are done with maintenance, just remove or rename the file and everything goes back to normal.

Source: Easiest way to take your web site offline (IIS 6.0 or IIS 7.5 with .NET 4.0)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM