问题描述
我下了app_Offline.htm在我的IIS7应用程序的根。这适用于呼叫的根网页,但不将呼叫页在应用程序的子目录。
I have placed an app_Offline.htm in the root of my IIS7 application. This works for calls to pages on the root, but not for calls to pages in a subfolder of the application.
如何来?而如何让工作也为子文件夹?
How comes? And how to make it work also for subfolders?
推荐答案
App_Offline.htm的目的不是为工作的子目录,只为整个应用程序的。我不知道它是如何工作的,但看看这个SO帖子上......为了使这项工作子目录你需要实现一个截取对文件的任何请求,它是文件路径的处理程序自定义的逻辑。
App_Offline.htm is not designed to work for subdirectories, only for the entire application, Scott Gu on App_Offline.htm. I'm not sure how it works, but check out this SO post on that... To make this work for subdirectories you would need to implement custom logic in a handler that intercepts any requests for files where it is in the file path.
这篇关于app_Offline.htm不会为我的IIS应用程序的子文件夹的工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!