IIS 7中ASP.Net中缓存图像的问题

时间:2022-05-01 02:09:10

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

我已经在我的网站中实现了缓存图像,它在IIS 6中正常工作但在IIS 7中无法正常工作问题是iis7托管服务器上我的网站上未显示的图像但在iss6托管服务器上显示我已使用此文章实现了缓存... 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

有没有人知道出了什么问题或任何人有关于图像缓存的好建议.....任何hellp将真的很感激...谢谢

2 个解决方案

#1


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

这是对web.config的快速编辑,用于在.NET中缓存images / css / js

<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

看到这篇文章: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?

您可能需要注册处理程序...是否在IIS7的web.config中?

try looking at this link?

试试看这个链接?

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

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

IIS7文件映射 - .asax,.ashx,.asap

#1


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

这是对web.config的快速编辑,用于在.NET中缓存images / css / js

<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

看到这篇文章: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?

您可能需要注册处理程序...是否在IIS7的web.config中?

try looking at this link?

试试看这个链接?

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

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

IIS7文件映射 - .asax,.ashx,.asap