如何在IIS 7.5中使Asp.net网站脱机 [英] How to take Asp.net website offline in iis 7.5

查看:127
本文介绍了如何在IIS 7.5中使Asp.net网站脱机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.NET网站,但是当我的客户尝试访问该网站时,我想显示一个维护中"页面.有人知道该怎么做吗?

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?

推荐答案

如果您正在.NET 4.0应用程序池(IIS 7.0或IIS 7.5)中运行应用程序,或者您的网站配置为ASP.NET 4.0网站(IIS 6.0),并且希望向您的客户端显示一个";维护中"页面在有限的时间内,最简单的方法是将一个名为app_offline.htm的文件放入您网站的根文件夹中.然后,您的应用程序将脱机,无论他们的请求是什么,都将通过app_offline.htm页面为客户提供服务.

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.

来源: 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆