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

  • SEARCH
  • Home
  • 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 6076523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:37:03+00:00 2026-05-23T10:37:03+00:00

I use the following to stream a file (usually Excel or PDF) to the

  • 0

I use the following to stream a file (usually Excel or PDF) to the browser. It operates by setting the location of a hidden iFrame to a download handler which contains the code.

t works fine in Firefox etc and in some instances of IE9 but not other instances of IE9.

Where it doesn’t work the Information bar appears but there is no option to Open, only Save or Cancel.

The Information bar then hangs and can’t be closed or cancelled.

Also the URL is changed so that the dot before the file prefix (eg .xls or .pdf) is changed to an underscore.

A typical correct one is

/export_templates/rawdata/downloadfile7.asp?fID=@_pdf@{875CFEE5-23D4-42CB-8885-7A9D493DC616}.pdf&fname=Quick%5Fpoll.pdf

Has anyone seen this or found a fix. There’s no add-ons enabled, no av stopping it. We’ve compared settings in IE, av and firewall on machines where it does and does not work and they are identical.

Set adoStream = CreateObject("ADODB.Stream")
adoStream.Open()
adoStream.Type = 1
adoStream.LoadFromFile(f.Path)
dataSize = f.size
Response.Buffer = true
Response.CharSet = "UTF-8"
Response.clear
Response.ContentType = "application/x-unknown" ' arbitrary
Response.AddHeader "Content-Length", dataSize
Response.AddHeader "Content-Disposition","attachment;filename=" & thisfname

Response.flush
do while not adoStream.eos
    Response.BinaryWrite adoStream.Read(1024 * 8)
    Response.flush
loop
Response.End()
adoStream.close
set adoStream=nothing
  • 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-23T10:37:03+00:00Added an answer on May 23, 2026 at 10:37 am

    I see two potential issues with the code above and two potential “extenuating circumstances”:

    1.) Not quoting the filename. I’ve seen issues when using:

    Content-Disposition: attachment;filename=File Name.pdf
    vs.
    Content-Disposition: attachment;filename="File Name.pdf"

    Note the double-quotes around the filename. This matters when the name contains spaces or other unsafe characters.

    2.) Wrong Content-Type. As mentioned in comments above this is an important cue to the system how the file should be treated. For PDF’s you really should be using application/pdf

    3.) Different transfer encodings. It’s possible this issue only affects gzipped (deflate) content. It wouldn’t be the first time IE has failed to handle compressed streams properly.

    4.) If you’re seeing different results between copies of the same browser you should attempt to establish whether they also have the same minor version as well as os, plugins, toolbars and PDF readers. Any of these things could be a factor.

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

Sidebar

Related Questions

I'm trying to use the following code to upload a csv file usually around
The following script is what I usually use to push headers to the browser
I use the following block of code to read lines out of a file
I'm trying to use the following code to create a zip file from a
Normally, I use the following code to serialize object to XML file. Everyday, I
Basically, using the following code on a file stream, I get the following: $basis
I'm trying to stream the file from file system to browser and cant get
I have an input PDF file (usually, but not always generated by pdfTeX), which
I am trying to send an OOXML Excel file to the browser based on
I Use following code for single file drag and drop. private void FormRegion2_DragEnter_1(object sender,

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.