cnblogs/dcrenl/IIS设置文件 App_Offline.htm 网站维护.html
2024-09-24 12:43:01 +08:00

5 lines
834 B
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div>在ASP.NET&nbsp;2.0&nbsp;站点根目录下,只要存在&nbsp;App_Offline.htm&nbsp;文件,那么所有对.aspx的请求都将转向App_Offline.htm&nbsp;。而且浏览器的地址栏显示的是所请求的.aspx的URL。<br /><br />这样当我们的站点需要维护时只要把App_Offline.htm&nbsp;拷贝到站点根目录下即可。</div>
<div><span style="color: #7b7d62;">VS发布时会自动生成App_Offline.htm文件</span></div>
<div>&nbsp;</div>
<div>注意事项:<br />&nbsp;1App_Offline.htm&nbsp;不能小于&nbsp;512&nbsp;字节。<br />&nbsp;2IIS&nbsp;不能&nbsp;Stop。<br />&nbsp;3只有对.aspx文件的请求才自动转到App_Offline.htm文件如果请求的是.htm文件则不会转到App_Offline.htm</div>
<div>&nbsp;3App_Offline.htm文件名不区分大小写</div>