How do you enable download of files with unknown ext, no ext whilstkeeping valid ext?

This is a discussion on How do you enable download of files with unknown ext, no ext whilstkeeping valid ext? within the Inetserver forums, part of the Microsoft Tools category; 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 ...

Go Back   Application Development Forum > Microsoft Tools > Inetserver

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-02-2008, 11:28 PM
peeping_t@hotmail.com
Guest
 
Microsoft Inet server asp, iis, ftp, smtp and security related discussions
Default How do you enable download of files with unknown ext, no ext whilstkeeping 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






Reply With Quote
  #2  
Old 07-04-2008, 02:05 AM
David Wang
Guest
 
Microsoft Inet server asp, iis, ftp, smtp and security related discussions
Default Re: How do you enable download of files with unknown ext, no extwhilst 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
//
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 01:01 PM.

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=