Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > content-dispositon, attachment and frames?

Reply
Thread Tools

content-dispositon, attachment and frames?

 
 
Johan Torstensson
Guest
Posts: n/a
 
      11-08-2004
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


 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      11-08-2004
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)

 
Reply With Quote
 
 
 
 
Johan Torstensson
Guest
Posts: n/a
 
      11-08-2004

"Evertjan." <(E-Mail Removed)> skrev i meddelandet
news:Xns959B871BA8E74eejj99@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


 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      11-08-2004
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)

 
Reply With Quote
 
Johan Torstensson
Guest
Posts: n/a
 
      11-08-2004

"Evertjan." <(E-Mail Removed)> skrev i meddelandet
news:Xns959B9460D9F9eejj99@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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I clean a virus within an inbox or just clean only that infectedattachment or LOCATE AND delete just that attachment ? Vinayak Firefox 1 08-14-2006 06:19 PM
Why paper clip shows in OE and no attachment Ockerr Computer Support 2 01-27-2005 08:12 PM
NNTP binary attachment downloader with asyncore and generators fishboy Python 1 06-04-2004 07:56 AM
NNTP binary attachment downloader using asyncore and generators fishboy Python 0 05-31-2004 11:34 AM
Problems decoding and writing mail attachment edwinek Python 2 08-04-2003 01:08 PM



Advertisments