Last post Jul 19, 2007 07:49 AM by marss
Jul 18, 2007 04:13 PM|WTM_Stephen|LINK
I have configured my IIS website to use my Imagehandler application and it works fine if the image being requested exists on the website. (by example
However, if the image does not exist (http://www.worldtechmission.com/Images/logo23.jpg) the handler does not fire. The goal of the handler is to intercept the image file and determine if it
exists. If it does not, it will return a 'dummy' image.
The question I guess is the order of events. Does IIS check to see if the location exists on the site
then if it exists, it executes the handler? If this is so, is there a way around this?
The secondary use of this will be to use the image file to 'track' emails received. Originally we were going to use something like <img src="....ashx?id=1234"..../> where the ashx would point to the handler which would return the correct image for the ID
value passed and record the ID to the database. The concern with this approach would be that the email's could be opened after a handler's name change.
Thank you in advance.
Jul 19, 2007 04:09 AM|ArtemL|LINK
IIS might have higher priority to handle this. I see two ways of get around this:
Jul 19, 2007 07:49 AM|marss|LINK
Run IIS Manager
Find necessary website
Select "Properties" from context menu
On Virtual Directory tab click Configuration button
On Mapping tab click Add button
Then enter following data:
Executable: C:\WINDOWS\Microsoft.NET\Framework\...\aspnet_isapi.dll, where ... is framework version.
Verbs/Limit to: GET
Uncheck combobox "Check that file exists".