ASP.NET 2.0 - 如何使用app_offline.htm [英] ASP.NET 2.0 - How to use app_offline.htm

查看:247
本文介绍了ASP.NET 2.0 - 如何使用app_offline.htm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读过有关它可以放在一个.NET 2.0应用程序的根这将在实质上关闭应用程序并禁用任何在 app_offline.htm 文件其他页面被请求。

I've read about the app_offline.htm file which can be placed within the root of a .NET 2.0 application which will in essence shut down the application and disable any other pages from being requested.

我放在根目录下的文件,我的网站还加载。我走进在IIS的默认文档,并将其设置为 app_offline.htm 和站点仍然加载(这可能是一个缓存的问题虽然)

I've placed the file in the root, and my site still loads. I went into default documents in IIS and set it to app_offline.htm and the site still loads (this might have been a caching issue though)

不管怎样,有没有人遇到用这个问题?难道我做错了什么?

Anyway, has anyone run into issues using this? Am I doing something wrong?

推荐答案

我已经使用了非常方便app_offline.htm招关停过去/更新的网站没有任何问题。

I have used the extremely handy app_offline.htm trick to shut down/update sites in the past without any issues.

请确保你实际上是放置app_offline.htm文件中,您已经IIS中配置网站的根。

Be sure that you are actually placing the "app_offline.htm" file in the "root" of the website that you have configured within IIS.

此外,还要确保该文件被命名正是因为它应该是: app_offline.htm

Also ensure that the file is named exactly as it should be: app_offline.htm

除此之外,应该没有其他变化到IIS,你应该需要,因为这文件的处理,使(与此特定名称)是由ASP.NET运行时,而不是IIS本身(IIS V6)处理

Other than that, there should be no other changes to IIS that you should need to make since the processing of this file (with this specific name) is handled by the ASP.NET runtime rather than IIS itself (for IIS v6).

请注意,但是,尽管将这个文件放在站点的根目录将强制应用程序停摆,并显示app_offline.htm文件本身的内容,任何的现有请求仍将得到真正的网站担任了他们。只有的新的的请求将得到app_offline.htm内容。

Be aware, however, that although placing this file in the root of your site will force the application to "shut down" and display the content of the "app_offline.htm" file itself, any existing requests will still get the real website served up to them. Only new requests will get the app_offline.htm content.

如果您仍然有问题,请尝试进一步的信息以下链接:

If you're still having issues, try the following links for further info:

斯科特谷的App_Offline.htm

App_Offline.htm和周围的IE友好错误工作功能

<一个href=\"http://stackoverflow.com/questions/179556/will-appoffline-htm-stop-current-requests-or-just-new-requests\">Will app_offline.htm停止请求书或只是新的要求?

这篇关于ASP.NET 2.0 - 如何使用app_offline.htm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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