Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3667284
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:58:54+00:00 2026-05-19T01:58:54+00:00

Basically I have a web site that renders HTML preview of some documents (mainly

  • 0

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:

<img width="50" height="50" src="http://portal/Service/GetFile.asxh?id=123&inline=true">

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.

Edit I thought I have solved this issue, but apparently with Fiddler turned on it works fine.

I had context.Response=”utf-8″ left in code, but removing it had no difference.

Headers:

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:

                    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 > 0)
                            {
                                context.Response.OutputStream.Write(buff, 0, bytesRead);
                            }
                        } while (bytesRead > 0);
                    }

                    context.Response.Flush();
                    context.Response.Close();
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T01:58:55+00:00Added an answer on May 19, 2026 at 1:58 am

    I’m pretty sure Chrome requires the Length to be set for images, so try adding the Content-Length header to your response when handling the image.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I run a lyrics web site and I have a single table that basically
I have a merchandising web site that allows user to buy stuff on my
I’m about to write quite a big web site that will basically be a
I am looking in to ways to enable a site to basically have something
Basically I have some code to check a specific directory to see if an
Basically I have a small template that looks like: <xsl:template name=templt> <xsl:param name=filter />
I want to make a site where there user can basically navigate the web
This is an annoying problem I am having with Twisted.web. Basically, I have a
We have a reporting web site and in the search screen most of the
Basically I have a website. I have a properly setup sitemap so I assume

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.