J
Joe Fallon
I have a page in ASP.Net 1.1 which contains an image control.
I set the ImageUrl property = "MyImageViewerPage.aspx"
This page acts as an image handler. I have an array of bytes which I send to
the browser using BinaryWrite.
e.g. Response.ContentType = mVar.contenttype
Response.BinaryWrite(mVar.MyBytes)
This all works great.
The problem is that if I request the main page using 2 different links I
sometimes get the wrong image.
But other times I get the right image. There is no pattern to this.
What I have found is that if I set a break point in page load of my image
handler page that it does not always get called. I confirmed this behavior
using Fiddler.
When I call the main page and I get the right image, Fiddler shows 2
requests - one for the main page and one for the image.
When I call the main page and get the wrong image, Fiddler only shows a
single request for the main page.
(Note the wrong image is just the image from the previous request that
worked. The rest of the data on the main page changes to the right record -
but since the image handler never gets called the old image is now shown on
the page.)
The question is - why does my browser not request the image handler page
every time?
I have even tried hardcoding it using an html control instead of an asp
control. No luck.
(BTW - both pages have expires = -1 in Fiddler.)
Thanks for any ideas.
I set the ImageUrl property = "MyImageViewerPage.aspx"
This page acts as an image handler. I have an array of bytes which I send to
the browser using BinaryWrite.
e.g. Response.ContentType = mVar.contenttype
Response.BinaryWrite(mVar.MyBytes)
This all works great.
The problem is that if I request the main page using 2 different links I
sometimes get the wrong image.
But other times I get the right image. There is no pattern to this.
What I have found is that if I set a break point in page load of my image
handler page that it does not always get called. I confirmed this behavior
using Fiddler.
When I call the main page and I get the right image, Fiddler shows 2
requests - one for the main page and one for the image.
When I call the main page and get the wrong image, Fiddler only shows a
single request for the main page.
(Note the wrong image is just the image from the previous request that
worked. The rest of the data on the main page changes to the right record -
but since the image handler never gets called the old image is now shown on
the page.)
The question is - why does my browser not request the image handler page
every time?
I have even tried hardcoding it using an html control instead of an asp
control. No luck.
(BTW - both pages have expires = -1 in Fiddler.)
Thanks for any ideas.