Re: Issue 55583 in chromium: Asp.net ASHX image handler not displaying in chrome

404 views
Skip to first unread message

chro...@googlecode.com

unread,
Mar 2, 2011, 12:30:32 PM3/2/11
to chromi...@chromium.org

Comment #1 on issue 55583 by stv...@yahoo.com: Asp.net ASHX image handler
not displaying in chrome
http://code.google.com/p/chromium/issues/detail?id=55583

I am also seeing the same problem. You can use my site to reproduce/verify
this; it does not require a log-in. You will see the torn page icon under
the "Draw Chart" button. Also note that if you right click this icon and
say "Open image in new tab", the image is displayed properly (in the new
tab).

http://bit.ly/fFgCQX
The image may take a long long time to load (a full minute or more). I'm
on a cheap hosting plan so this is what I have to deal with when nobody
uses this feature on my site for a while.


If the link above doesn't work, you can go to
http://nhl.multimatchupsports.com. Select any number of teams in the table
(at least one) and click "Compare Schedules" then scroll down to the bottom
of the page (or click the "Chart" link). Click the "Draw Chart" button.
You'll see a "Loading..." GIF then the torn page icon should appear after a
few seconds (again, it may take a minute or more for it to load the first
one).

chro...@googlecode.com

unread,
Mar 29, 2011, 6:56:04 AM3/29/11
to chromi...@chromium.org

Comment #2 on issue 55583 by kris...@gmail.com: Asp.net ASHX image handler

Had the same problem as you guys, images were working in all other browsers
than Chrome. Fixed it by specifying Content-Length in the response header.

string personName = context.Request.QueryString["person"];

ADSearch.SearchAD ADSearcher = new ADSearch.SearchAD();
byte[] image = ADSearcher.GetPhotoAsByteArray(personName);

if (image != null)
{
context.Response.AppendHeader("Content-Length", image.Length.ToString());
context.Response.ContentType = "image/jpeg";
context.Response.OutputStream.Write(image, 0, image.Length);
}

Hope that helps!

chro...@googlecode.com

unread,
Sep 5, 2011, 3:04:51 PM9/5/11
to chromi...@chromium.org

Comment #3 on issue 55583 by george.f...@gmail.com: Asp.net ASHX image

Hi I had the same issue. You must to add the inline on the header:
response.AddHeader("content-disposition", "inline;filename=myimage.jpeg");
This solve the problem.

chro...@googlecode.com

unread,
Feb 14, 2012, 11:03:36 AM2/14/12
to chromi...@chromium.org

Comment #4 on issue 55583 by abhishek...@gmail.com: Asp.net ASHX image

Thx nic solution

chro...@googlecode.com

unread,
Feb 14, 2012, 11:15:55 AM2/14/12
to chromi...@chromium.org

Comment #5 on issue 55583 by abhishek...@gmail.com: Asp.net ASHX image

thx kris nic solution

chro...@googlecode.com

unread,
Aug 27, 2012, 7:44:59 AM8/27/12
to chromi...@chromium.org

Comment #7 on issue 55583 by siraj.pa...@gmail.com: Asp.net ASHX image
thanx kris ....added ur solution .nw workng fine in chrome

Reply all
Reply to author
Forward
0 new messages