Problem in Caching Images in ASP.Net in IIS 7

删除回忆录丶 提交于 2019-12-24 01:19:41

问题


I have implemented caching Images in my website, It is working fine in IIS 6 but not working in IIS 7 problem is images not shown on my website on iis7 hosted server but shown on iss6 hosted server
I have implemented caching using this Article.... http://www.codeproject.com/KB/aspnet/CachingImagesInASPNET.aspx

Does anyone have any idea what's going wrong or anyone have good suggestion regarding Image caching.....Any hellp will realy appreciated...
Thanks


回答1:


Here's a quick edit to web.config for caching images/css/js in .NET

<staticContent>
 <clientCache httpExpires="Sun, 29 Mar 2020 00:00:00 GMT" cacheControlMode="UseExpires" />
</staticContent>

see this post: http://madskristensen.net/post/Add-expires-header-for-images.aspx




回答2:


You might need to register the handler... Is it in you web.config for IIS7?

try looking at this link?

<add path="*.ashx" verb="*" type="System.Web.UI.SimpleHandlerFactory" validate="True" />

IIS7 file mappings - .asax, .ashx, .asap



来源:https://stackoverflow.com/questions/1068153/problem-in-caching-images-in-asp-net-in-iis-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!