Last post May 14, 2009 08:22 AM by Dougal2345
Feb 16, 2009 07:54 AM|kitkatrobins|LINK
I have the following
---> Web application (ASP.NET 2.0 app)
--> --> Virtual directory (http://localhost/webapp/downloads pointing to C:\FileStore)
I also have the following http handler config items in my web.config for the web application:
<remove verb="*" path="*.gif" />
<remove verb="*" path="*.jpg" />
<remove verb="*" path="*.png" />
<add verb="*" path="*.gif" type="Website.Common.Images.CachingHandler, Website" />
<add verb="*" path="*.jpg" type="Website.Common.Images.CachingHandler, Website" />
<add verb="*" path="*.png" type="Website.Common.Images.CachingHandler, Website" />
I have links looking at the virtual directory (http://localhost/webapp/downloads/gallery/image01.jpg) but this is not using the HTTP handler I have set. I thought any config set at this level would go down to any items below?
The http handler is in the web app assembly.
Feb 17, 2009 10:21 AM|kitkatrobins|LINK
Feb 18, 2009 11:59 PM|Nai-Dong Jin - MSFT|LINK
From your description, it seems that the handler does not work in the virtual directory. Have you tried that if the handler can work in the default website folder or any other virtual folder? If it still can't work, you need to try the settings in IIS, make
sure that the file with gif,png and jpg extensions should be passed to ASP.NET to handler.
May 11, 2009 10:48 AM|Dougal2345|LINK
I have a very similar problem to the above, also on IIS6.
I have an httphandler configured on my web application, for FLV files. It works well for any FLV files in the web application's virtual directory.
<add verb="*" path="*.flv" type="FlvHandler.FlvStreamHandler, FlvHandler" />
But I have created another virtual directory, "nested" inside the main one. If I put an FLV file in there and request it, I see an error "Could not load file or assembly 'FlvHandler' or one of its dependencies. The system cannot find the file specified."
I have correctly set up the .flv file type in the application extensions list of the virtual sub-directory.
But here's the interesting thing. I go to the folder that the virtual sub-directory points to, add a "bin" folder, and put another copy of the "FlvHandler.dll" in there, and everything is fine!
So it seems that when a request is made to the sub-directory, IIS is looking at the web.config in the parent directory, but then trying to find the FlvHandler.dll in the sub-directory, not the parent...
Is there a way around this?
Thanks for any help.
May 14, 2009 08:22 AM|Dougal2345|LINK
Sorry to "bump" this question, my fault for tagging a question to the end of a thread that's already been answered!
Hope someone who is less of a dunderhead than me can have a think about it though. What I guess I need is some way to specify an absolute path to a .dll in the config file httphandler elements - is that feasible?