About the IIS server download new file type prompt for files not found

Source: Internet
Author: User
Tags mail exchange

new downloadable file types in IIS6
IIS 6.0 cannot handle unknown MIME types IIS6 only serves requests for files with known file name extensions. If the file name extension of the requested content is not mapped to a known extension, the server rejects the request.  That is, IIS does not support unknown file extension downloads! When you request a file from the IIS 6.0 Web server, and the file's extension is not a defined MIME type on the Web server, you see the following error message:HTTP Error 404-file or directory not found.
Cause earlier versions of IIS contain wildcard MIME mappings that allow IIS to process any file without having to consider the extension. IIS 6.0 does not contain the wildcard MIME mapping and cannot handle extensions of any type that are defined outside of the MimeMap node in the IIS metabase.

Principle:

Using the MIME type multipurpose Internet Mail Exchange (MIME) type describes how a Web browser or mail application handles files received from the server. For example, when a Web browser requests an item on a server, the MIME type of the object is also requested. Some MIME types (examples) can be displayed inside the browser.  Other MIME types, such as word processing documents, need to be displayed using an external help application. When IIS passes a mail message to a mail application or to a client Web browser, IIS also sends the MIME type of the data being passed. If there are additional or embedded files that are passed in a specific format, then IIS notifies the client application that the MIME type of the file is embedded or attached. The client application then knows how to process or display the data that is being received from IIS. IIS provides services only for files that have extensions registered in the MIME type list, and also allows you to configure additional MIME types and to change or remove MIME types.

IIS is pre-configured to recognize the default settings for global MIME types. These MIME types are recognized by all sites that you create in IIS. MIME types can also be defined at the site and directory level independently of other or globally defined types.

When you view MIME types at the site or directory level, only the types that correspond to this level are displayed, not all types that inherit from the previous level.

If the MIME type is modified at a lower level and the same MIME type is applied at the global level, the MIME type at the global level overrides the MIME type that was modified at the lower level.

If a client request references a file extension whose extension is not defined in the MIME type, IIS returns a 404.3 error.

You can also configure IIS to serve all files by adding a wildcard (*) MIME type, ignoring the file name extension. You must be a member of the Administrators group on the local computer, or you must have been delegated the appropriate permissions to perform the following steps.

As a best practice for security, log on to the computer using an account that is not part of the Administrators group, and then run IIS Manager as an administrator using the Run as command. At the command prompt, type runas/user:administrative_accountname "mmc%systemroot%/system32/inetsrv/iis.msc".

Solution:

In IIS Manager, "HTTP Header", "MIME type", "new", enter your own new file type extension, the second column casually write. Then restart the IIS server. Note that restarting IIS is not a Web site.

Add:

How to restart IIS: at the command line, run "net stop w3svc" to shut down the IIS server and run "net start w3svc" to start the IIS server.


Let's take an example:

Let IIS6 support DVF file format download below:
DVF file is a Sony compressed Voice file or DV Studio camcorder Graphics file, which is typically used for audio pen files.

To define a MIME type for a specific extension, follow these steps:

1. Open the IIS Microsoft Management Console (MMC), right-click the local computer name, and then click Properties.

2. Click MIME Type.

3. Click "New".

4. In the Extension box, type the file name extension you want (for example,. DVF Audio pen file).

5. In the MIME type box, type Application/octet-stream.

6. Apply the new settings. Note that you must restart the World Wide Web Publishing Service or wait for the worker process to cycle for the changes to take effect.

In this example, IIS can now process files with the. dvf extension, and your IIS will be able to provide a download of the audio pen file.

Again, note that you must restart the IIS service or wait for the worker process to cycle for the changes to take effect.


About the IIS server download new file type prompt for files not found

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.