I'm working on an IHttpHandler implementation which will handle all *.gif files. The Handler itself will have code in it to check whether the *.gif files are requested from a certain URL. If this is the case, some customer logic should be performed to put a customer gif in the response.

But I don't know what to do when a regular gif is requested. This should be processed as normal. How do I do this?

Was it helpful?


I would advice you have your generic handler serve only special/dynamic gif files which could be requested like that: myhandler.ashx?file=name and leave IIS handle normal .gif files. Once you associate the ASP.NET runtime with the .gif extension in IIS, you will have to implement static files serving which might not be as robust as in IIS.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow