gpt4 book ai didi

iis-7 - app_offline 站点返回 "The service is unavailable."

转载 作者:行者123 更新时间:2023-12-03 01:32:12 25 4
gpt4 key购买 nike

我正在遵循 Scott gu 的技巧,将 App_Offline.htm 页面放置在我的应用程序的路径中以使其脱机 - http://weblogs.asp.net/scottgu/archive/2006/04/09/442332.aspx

但它似乎无法在我的网站上运行。我将该文件放置在我的一个网站的 IIS7 中,所有流量都会重定向到该文件。

但是在其他站点、同一服务器等中,我得到一个包含“服务不可用”的页面。

不确定我哪里出错了 - 有什么想法吗?

最佳答案

我设法通过将以下代码放入我的 web.config 中来解决这个问题:

<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />

<defaultDocument>
<files>
<clear />
<add value="index.html" />
<add value="app_offline.htm" />
</files>
</defaultDocument>

<httpErrors errorMode="Custom" existingResponse="Replace">
<clear />
<error statusCode="503" path="App_Offline.htm" responseMode="File" />
</httpErrors>
</system.webServer>
</configuration>

此修复是通过整理 Scott Gu 中的一些信息找到的。 , npiaseck @ IIS ForumKurt Schindler .

关于iis-7 - app_offline 站点返回 "The service is unavailable.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17135109/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com