Problem in Caching Images in ASP.Net in IIS 7

2019-07-10 19:01发布

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

2条回答
对你真心纯属浪费
2楼-- · 2019-07-10 19:17

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

查看更多
SAY GOODBYE
3楼-- · 2019-07-10 19:27

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

查看更多
登录 后发表回答