|
|
|
date: Wed, 2 Jul 2008 21:28:05 -0700 (PDT),
group: microsoft.public.inetserver.iis
back
How do you enable download of files with unknown ext, no ext whilst
keeping valid ext?
Hi,
I'm trying to set up an Internal HTTP File Share with IIS 6.0 on
Win2K3SP1, but I can't figure out how to enable the IIS server to
return files with no extensions as well as files with unknown
extensions whilst allowing known file types, html, txt etc, to be
returned with the correct mime type.
If I add mime mapping "." -> application/octet-stream I can download
files with no extension, known files get returned with the correct
mime type, but I can't download files with unknown extension e.g.
foo.bar.
If I add mime mapping ".*" -> application/octet-stream I can download
files with no and unknown extensions, but valid extensions are also
returned as application/octet-stream, making it impossible to read
html files and txt files in the browser (other than IE that actually
inspects the contents of the file).
Is it impossible to configure IIS 6.0 to allow for these 3 rules?
1. Files with no extension must be returned as application/octet-
stream
2. Files with unknown extensions must be returned as application/octet-
stream
3. Files with known extension must be returned with the corresponding
mime type.
Cheers
CM
date: Wed, 2 Jul 2008 21:28:05 -0700 (PDT)
author: unknown
Re: How do you enable download of files with unknown ext, no ext
whilst keeping valid ext?
On Jul 2, 9:28 pm, peepin...@hotmail.com wrote:
> Hi,
>
> I'm trying to set up an Internal HTTP File Share with IIS 6.0 on
> Win2K3SP1, but I can't figure out how to enable the IIS server to
> return files with no extensions as well as files with unknown
> extensions whilst allowing known file types, html, txt etc, to be
> returned with the correct mime type.
>
> If I add mime mapping "." -> application/octet-stream I can download
> files with no extension, known files get returned with the correct
> mime type, but I can't download files with unknown extension e.g.
> foo.bar.
>
> If I add mime mapping ".*" -> application/octet-stream I can download
> files with no and unknown extensions, but valid extensions are also
> returned as application/octet-stream, making it impossible to read
> html files and txt files in the browser (other than IE that actually
> inspects the contents of the file).
>
> Is it impossible to configure IIS 6.0 to allow for these 3 rules?
> 1. Files with no extension must be returned as application/octet-
> stream
> 2. Files with unknown extensions must be returned as application/octet-
> stream
> 3. Files with known extension must be returned with the corresponding
> mime type.
>
> Cheers
>
> CM
Correct. You will not be able to configure built-in IIS features to
behave like that because the IIS StaticFile Handler does not work like
that. It is possible to extend IIS such that your own handler will
behave like that.
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//
date: Fri, 4 Jul 2008 00:05:20 -0700 (PDT)
author: David Wang
|
|