views:

809

answers:

2

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

A: 

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" />

http://stackoverflow.com/questions/702572/iis7-file-mappings-asax-ashx-asap

BigBlondeViking
add, but no success, any other findings? Thanks
Muhammad Akhtar
just for arguments sake can you post a url that is having the problem?I want to see what you are using exactly.
BigBlondeViking
this is URL http://nomanibooks.com/
Muhammad Akhtar
I have changed IIS pipeline mode integrated to classic, images are shown, Problem seems to be resolved, but when setting pipeline mode to integrated, issue still remain,,. setting classic identical to IIS 6.. any thought.... Thanks
Muhammad Akhtar
http://blogs.msdn.com/tmarq/archive/2007/08/30/iis-7-0-asp-net-pipelines-modules-handlers-and-preconditions.aspx
Muhammad Akhtar
Sorry I am out of ideas... Try Posting A question to the CodeProject forum for that solution... I will continue to think about it.. I have a file handler doing something similar on my IIS7 machine... and its working.. so it has to be some kind of setup/config issue :(
BigBlondeViking
+1  A: 

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

Digitz
good to see this, thanks...
Muhammad Akhtar