0

我有一个用于在线目的的空站点。它本质上只是app_offline.htm, 一个图像和一个web.config. 这是在带有 .NET4/Integrated 的 IIS7.5 中运行的(没有代码,但为什么不使用最新的呢?)

当我转到主页时,我得到 的内容app_offline,但是当我转到http://www.contoso.com/about时,我得到一个 404。根据http://blog.kurtschindler,这个问题得到了解决。 net/post/app_offlinehtm-gotchas-with-aspnet-mvc,与

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

但随后图像,我们的标志,也停止出现。有没有办法让app_offline.htm所有友好的 URL 显示,但不是图像?

4

1 回答 1

3

将您的图像编码为 base64:

<img alt="sample" src="data:image/png;base64,ImageToBASE64String"/>

app_offline.htm 至少需要 512 字节长。

http://en.wikipedia.org/wiki/Data_URI_scheme

类似问题: App_offline.htm、CSS、图像和 aspnet_isapi.dll

于 2013-06-28T22:34:20.140 回答