app_Offline.htm不会为我的IIS应用程序的子文件夹的工作 [英] app_Offline.htm doesn't work for subfolders of my application in IIS

查看:175
本文介绍了app_Offline.htm不会为我的IIS应用程序的子文件夹的工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下了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的目的不是为工作的子目录,只为整个应用程序的斯科特谷上App_Offline.htm 。我不知道它是如何工作的,但看看这个<一个href=\"http://stackoverflow.com/questions/6929494/how-does-app-offline-htm-stopping-an-iis-site-and-stopping-an-app-pool-affect-c\">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应用程序的子文件夹的工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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