By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,870 Members | 2,347 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,870 IT Pros & Developers. It's quick & easy.

content-dispositon, attachment and frames?

P: n/a
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
Jul 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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?

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

Jul 21 '05 #2

P: n/a

"Evertjan." <ex**************@interxnl.net> skrev i meddelandet
news:Xn********************@194.109.133.29...
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?

--
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
Jul 21 '05 #3

P: n/a
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.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 21 '05 #4

P: n/a

"Evertjan." <ex**************@interxnl.net> skrev i meddelandet
news:Xn*******************@194.109.133.29...
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.
--
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

Jul 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.