Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS 7.5: How to let him serve by default all file extensions (without manually adding them)?

It is a little annoying that every time when you put a "new" file-extension on your IIS 7.5 backed server for simple http-download you have to think about adding the extension to the IIS configuration!

(e.g. provide a file zipped in the format .7z)

Is there a way to tell IIS "serve anything" (like it is the default setting in Apache-Webserver) ?

Thanks

like image 852
AMeyer Avatar asked Jul 18 '11 10:07

AMeyer


2 Answers

You should add the following to the MIME types:

For files with any extension (i.e. foo.somethingcrazyhere)

extension: .* MIME type: application/octet-stream

For files without any extension (i.e. SOMETHING_CRAZY_HERE_NO_DOT)

extension: . MIME type: application/octet-stream

like image 137
Carlos Rendon Avatar answered Oct 13 '22 23:10

Carlos Rendon


You should add the following to the MIME types:

extension:  .*
MIME type:  application/octet-stream

After that (depending on the browser) every unknown file will be forced to download.

like image 35
inf3rno Avatar answered Oct 14 '22 00:10

inf3rno