![](/img/trans.png)
[英]how to achieve conditional app_offline.htm in asp .net IIS 7
[英]How do I implement app_offline.htm correctly?
我有一个用于在线目的的空站点。 本质上,它只是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中,而不显示在图像中?
将图像编码为base64:
<img alt="sample" src="data:image/png;base64,ImageToBASE64String"/>
app_offline.htm必须至少为512个字节长。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.