Hi,

I'm not sure if this is an IIS issue or a problem with IE, but here goes.

I'm developing an online File Manager program in .Net, one part of the site
allows you to view all the files, and download them to the local PC, to do
this I'm using the Content-Disposition=attachment header to force IE to give
the save dialogue rather than open the file directly in IE. To do this I
have a hidden IFRAM, that get it's location update to
GetFile.aspx?id=--------- this sets the correct headers, and sends the file
down in the stream.

This works fine on WinXP, but when I try this on Windows 2003 (SP1) with
IE6.0.3970.1830(SP1) it still loads the file inside IE, the strange thing
is, if I go directly to the GetFile.aspx page in IE, I get the Save dialogue
as expected, so it seems as it's an issue doing this with IFrames.
*confused*

The headers sent by IIS are:

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.1
Date: Tue, 14 Mar 2006 16:06:44 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Content-Disposition: attachment; filename=DSCN1431.JPG;
Cache-Control: private
Content-Type: image/jpeg
Content-Length: 380282

The same thing happens when using IIS6

Any Ideas?

RE: Unusual Content-Disposition issue by v-yren

v-yren
Wed Mar 15 01:50:58 CST 2006

Hi,

Thanks for posting!

From your description, I think the issue is related to IE. My understanding
is that the file is automatically downloaded when you directly access the
GetFile.aspx page. If I have misunderstood anything, please let me know.

First, I suggest you uninstall the "IE enhanced security integration" in
the "Add/Remove Windows Components" and try again to figure out whether the
problem still occurs.

If the problem still has not been resolved, could you please supply a
public sample for this issue? This will help me to repro the problem and
find out some factors. I appreciate your understanding!

Regards,

Yuan Ren [MSFT]
Microsoft Online Support