content-dispositon, attachment and frames?

  • Thread starter Johan Torstensson
  • Start date
J

Johan Torstensson

Hi,

I've noticed that IE6 on Windows Xp with SP2 sometimes closes the browser
window after the open/save dialogue.

The problem seems only to occur when using the header "Content-Disposition",
"attachment; filename=thefilename.txt" and when the browser window is a
child of another window and when the download link is on a page inside a
frame.

In my case the users log on to the system and from a portal-page they click
their way to diffent projects, which are opened in new windows (making them
childs of the "portal" browser window). The project page is a frameset. When
downloading a file from here the browser window closes.

The problem dissapears when loading the project page directly in a new
browser, from a bookmark or if the user types the url manually. But this is
not the general approach of my users, they come in using the portal, as it
was intended.


I've seen a few posts about similar problems here and there, but I've never
seen any solutions. Anyone got any ideas?


Thanks
Johan
 
E

Evertjan.

Johan Torstensson wrote on 08 nov 2004 in
microsoft.public.inetserver.asp.general:
I've noticed that IE6 on Windows Xp with SP2 sometimes closes the
browser window after the open/save dialogue.

The problem seems only to occur when using the header
"Content-Disposition", "attachment; filename=thefilename.txt" and when
the browser window is a child of another window and when the download
link is on a page inside a frame.

Where does ASP come in?
 
J

Johan Torstensson

Evertjan. said:
Johan Torstensson wrote on 08 nov 2004 in
microsoft.public.inetserver.asp.general:


Where does ASP come in?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

The download links are passed to a ASP-file initiating the download.

Set objStream = Server.CreateObject("ADODB.Stream")
Response.Expires = 0
Response.Buffer = True
Response.Clear
Response.AddHeader "content-disposition", "attachment; filename=" & fileName
Response.AddHeader "content-length", fileSize
Response.ContentType = "application/octet-stream"
objStream.Type = adTypeBinary
objStream.Open
objStream.LoadFromFile filePath
Response.BinaryWrite objStream.Read
Response.End

I don't really believe it's an ASP-problem. I've tested different variations
of content-types etc. with the same results. And the code does work, just
not in the combinatioin of frames and windows that we have in our solution.
I posted my problem in this group in hope to get a answer from other
developers maybe experiencing the same problem. In the more general IE6
groups I get answers like "disable norton antivirus" or a link on how to
remove spyware.

Johan
 
E

Evertjan.

Johan Torstensson wrote on 08 nov 2004 in
microsoft.public.inetserver.asp.general:
Response.AddHeader "content-disposition", "attachment; filename=" &
fileName Response.AddHeader "content-length", fileSize
Response.ContentType = "application/octet-stream"
objStream.Type = adTypeBinary
objStream.Open
objStream.LoadFromFile filePath
Response.BinaryWrite objStream.Read
Response.End

I don't really believe it's an ASP-problem. I've tested different
variations of content-types etc. with the same results. And the code
does work, just not in the combinatioin of frames and windows that we
have in our solution. I posted my problem in this group in hope to get
a answer from other developers maybe experiencing the same problem. In
the more general IE6 groups I get answers like "disable norton
antivirus" or a link on how to remove spyware.

I gave up on

Response.AddHeader "content-disposition", "attachment; filename=" &

It seems that IE is not well diposed on that.
 
J

Johan Torstensson

Evertjan. said:
Johan Torstensson wrote on 08 nov 2004 in
microsoft.public.inetserver.asp.general:


I gave up on

Response.AddHeader "content-disposition", "attachment; filename=" &

It seems that IE is not well diposed on that.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

I just get this behavior on IE6 on Windows XP with SP2. It has worked on
older versions of IE and it still works on IE6 on my Windows 2000 machine.

The usage of the header is described here in this knowledge base:
http://support.microsoft.com/kb/260519/EN-US/

/johan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top