download text/plain file without .txt extension



I have an aspx page that generates a file on the fly for a person to
download. It sends these http headers:

Content-Type: text/plain
Content-Disposition: attachment; filename="myfile.lic"

The file being downloaded is a license file and MUST be stored with that
..lic extension.

If I access this aspx page with IE, it prompts me if I want to open or save
the file. I choose save, and it prompts me for a location and filename, and
the default filename is indeed myfile.lic. But when it actually saves it,
it renames it to myfile.lic.txt.

Very frustrating! Incidentally, IE behaves this way, Firefox does not.
Firefox saves the file with the name I specified.

As a user, when I choose to save the file, I can force IE to use the exact
filename I want by surrounding it with double quotes: "myfile.lic". Then
the .txt doesn't get tacked on. But I can't force those extra quotes on
there in the Content-Disposition line.

Anyone have a solution?


Nate


.



Relevant Pages

  • RE: black screen start up
    ... Which software did you download? ... Please reply to the newsgroup it allows others to benefit from these threads as well. ... The views and opinions expressed here are purely personal and do not necessarily express the views and/or opinions of Microsoft. ... | Content-Type: text/plain; ...
    (microsoft.public.win2000.general)
  • RE: Downloaded document has disappeared by the time Word has opened
    ... property of your response object. ... seems no other particular things except the content-type value. ... save or cancel the download. ... |> Open, the file downloads but by the time Word opens, the copy ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: IIS 6 Windows 2003 SP1 RC 1289 Download bug
    ... ASPX works fine ... I noticed with compression on you could not type the xp sp2 exe link ... Now i can work on the other bugs in sp1 like the delete / rename bug, ... Just encase anyone reading this wants to know the aspx code to download a ...
    (microsoft.public.inetserver.iis)
  • Re: IIS 6 Windows 2003 SP1 RC 1289 Download bug
    ... What matters is if you have a ScriptMap ... normally a directly static file download UNLESS you have a Scriptmap of .exe ... Of course, files sent via ASPX ... Same static/dynamic download with compression turned off - successful ...
    (microsoft.public.inetserver.iis)
  • Re: IIS 6 Windows 2003 SP1 RC 1289 Download bug
    ... your download is not exactly "direct". ... A "direct" download would be something sent by the IIS static file handler ... the response is subject static and dynamic compression. ... it looks like your ASPX page is causing the problem. ...
    (microsoft.public.inetserver.iis)