Hi Doug,
Did you find a sollution for this problem? I am having the same problem, playing arround with it for almost a full day now without any progress...
What I am trying to do is to show pictures from a database while making it look like they are just physical e.g. Picture1.jpg instead of ShowPicture.aspx?PictureId=1.
This all works without a problem aslong as I embed the picture in a form with a img tag. When I want to show just the picture e.g. (www.mysite.com/Picture1.jpg) FireFox will fire the handler multiple times while no problem with IE.
Handler
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "image/jpeg"
// retrieve picture in SqlDataReader myReader
context.Response.OutputStream.Write((byte[])myReader["FileData"], 0, ((byte[])myReader["FileData"]).Length);
}
web.config
<add verb="GET" path="*.jpg" type="ViewFileHandler" validate="false"/>
I noticed;
- FireFox will fire 3 times in normal situation
- FireFox will fire 2 times if the url does not have the .jpg or .gif extention
- FireFox will only fire once if (besides different extention) the ContentType is not set to "image/jpg" (ofcourse it won't show a picture then...)