App_offline.htm,CSS图象及ASPNET_ISAPI.DLL [英] App_offline.htm, CSS, images, and aspnet_isapi.dll

查看:219
本文介绍了App_offline.htm,CSS图象及ASPNET_ISAPI.DLL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我工作的网站是与ASPNET_ISAPI.DLL协调使用URL重写协作(一切都被映射到它)。我把我的app_offline.htm文件,所有的文字显示,但是,CSS或图像不会被送达。我猜他们正在通过ASP.NET处理由于通配符映射,而不是IIS。它是否正确?如果是这样,我怎么能允许IIS服务这些文件?此外,一个问题,我可以看到arising..in在web.config的重写设置:

So, the site I'm working on is using urlrewriting in coordination with aspnet_isapi.dll (everything is mapped to it). I put up my app_offline.htm file, and all the text shows, however, the CSS or images aren't being served. I'm guessing they're being processed by ASP.NET due to the wildcard mapping instead of IIS. Is this correct? If so, how can I allow IIS to serve these files? Furthermore, an issue I can see arising..in the web.config for the rewriter settings:

<rewrite url="^~/images/network/(.*)/(.*).jpg$" to="~/services/ImageHandler.ashx?type=$1&amp;id=$2"/>
	<rewrite url="^~/image/view/(.*).jpg$" to="~/ServePRView.aspx?id=$1"/>
	<rewrite url="^~/asset/view/(.*).jpg$" to="~/services/ImageHandler.ashx?id=$1&amp;type=asset"/>

感谢您的帮助所有,
史蒂夫

Thanks for the help all, -Steve

推荐答案

这是因为,如果Web服务器看到一个App_Offline.htm文件,则把该文件在网站的每个请求 - 甚至图像。你必须从其他网站上投放的图像。或者你可以尝试这样的事情<一href=\"http://en.wikipedia.org/wiki/Data_URI_scheme\">http://en.wikipedia.org/wiki/Data_URI_scheme

It's because if the webserver sees an App_Offline.htm file, it serves that file for every request in the site - even images. You have to serve images from another site. Or you can try something like this http://en.wikipedia.org/wiki/Data_URI_scheme

这篇关于App_offline.htm,CSS图象及ASPNET_ISAPI.DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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