Note that there are some explanatory texts on larger screens.

plurals
  1. POChrome browser does not show images generated by HTTP handler
    primarykey
    data
    text
    <p>Basically I have a web site that renders HTML preview of some documents (mainly office). The resulting HTML fragment is included in the page returned by the same web site, however images are returned by HTTP handler from another site with the following links:</p> <pre><code>&lt;img width="50" height="50" src="http://portal/Service/GetFile.asxh?id=123&amp;inline=true"&gt; </code></pre> <p>For some reason all browsers except Chrome (e.g. IE6/7/8, Firefox, Opera, Safari) show everything just fine, however for these images Chrome shows "broken image" icon. If I choose "Open image in new tab" then the image is shown just fine. </p> <p><strong>Edit</strong> I thought I have solved this issue, but apparently with Fiddler turned on it works fine.</p> <p>I had context.Response="utf-8" left in code, but removing it had no difference.</p> <p>Headers:</p> <pre><code>HTTP/1.1 200 OK Date: Wed, 05 Jan 2011 14:26:57 GMT Server: Microsoft-IIS/6.0 MicrosoftOfficeWebServer: 5.0_Pub X-Powered-By: ASP.NET X-AspNet-Version: 4.0.30319 Transfer-Encoding: chunked Cache-Control: no-cache Pragma: no-cache Expires: -1 Content-Type: image/jpeg </code></pre> <p>Code:</p> <pre><code> context.Response.ContentType = file.ContentType; context.Response.Cache.SetCacheability(HttpCacheability.NoCache); byte[] buff = new byte[BuffSize]; using (var stream = repository.GetFileContentsAsStream(file.ContentId)) { int bytesRead; do { bytesRead = stream.Read(buff, 0, BuffSize); if (bytesRead &gt; 0) { context.Response.OutputStream.Write(buff, 0, bytesRead); } } while (bytesRead &gt; 0); } context.Response.Flush(); context.Response.Close(); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload