The IIS server prompts that the file cannot be found when downloading the new file type.

Source: Internet
Author: User
Tags mail exchange

The IIS server prompts that the file cannot be found when downloading the new file type.
Added the downloadable file type in IIS6.
IIS 6.0 cannot process unknown MIME-type IIS6 and only serves requests for files with known file extensions. If the file extension of the request content is not mapped to a known extension, the server rejects the request. That is, IIS does not support extended download of unknown files! When you request a file from the IIS 6.0 Web server, and the file extension is not the MIME type defined on the Web server, you will see the following error message: HTTP Error 404-the file or directory cannot be found.
The reason is that earlier versions of IIS contain wildcard MIME ing, allowing IIS to process any file without considering the extension. IIS 6.0 does not contain this wildcard MIME ing and cannot process any type of extension defined beyond the MimeMap node in the IIS metadatabase.

Principle:

The MIME-Type Multipurpose Internet Mail Exchange (MIME) type illustrates how Web browsers or Mail applications process files received from servers. For example, when a Web browser requests a project on the server, it also requests the MIME type of the object. Some MIME types (examples) can be displayed in the browser. Other MIME types (such as text processing documents) need to be displayed by external help applications. When IIS sends an email message to the mail application or the webpage to the client Web browser, IIS also sends the MIME type of the transmitted data. If an additional or embedded file is transmitted in a specific format, IIS notifies the client application of the MIME type of the embedded or attached file. Then the client application knows how to process or display the data that is being received from IIS.IIS only provides services for files with extensions registered in the MIME type list, and allows you to configure other MIME types and change or delete MIME types.

IIS pre-configuration is the default setting for Recognizing global MIME types. All websites you create in IIS can recognize these MIME types. MIME types can also be defined on websites and directories independently of other or globally defined types.

When viewing MIME types at the website or directory level, only the types corresponding to this level are displayed, not all types inherited from the previous level.

If the same MIME type is applied at the global level after the MIME type is modified at a lower level, the Global MIME type will overwrite the modified MIME type at a lower level.

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

By adding the wildcard (*) MIME type, you can also configure IIS to provide services to all files, regardless of the file extension. You must be a member of the Administrators group on the local computer or be granted the relevant permissions to perform the following steps.

As the best security operation, log on to your computer using an account that is not in the Administrators group, and run the command as an administrator to run IIS manager. At the command prompt, type runas/user: administrative_accountname "mmc % systemroot %/system32/inetsrv/iis. msc ".

Solution:

In the IIS manager, choose "http header"> "MIME type"> "new", enter your new file type extension, and write it in the second column. Then restart the IIS server. Restart IIS, not a website.

Supplement:

To restart IIS, Run "net stop w3svc" on the command line to disable the IIS server and run "net start w3svc" to start the IIS server.

For example:

Let IIS6 support downloading DVf files in the following format:
The DVF File is Sony Compressed Voice File or DV Studio Camcorder Graphics File, which is generally used in recording pen files.

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

1. Open the IIS Microsoft Console (MMC), right-click the name of the local computer, and click "properties ".

2. Click "MIME type ".

3. Click "new ".

4. In the "extension" box, type the desired file extension (for example,. dvf recording pen file ).

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

6. Apply new settings. Note that you must restart the Web Publishing Service or wait for the workflow to take effect.

In this example, IIS can now process files with the. dvf extension. Your IIS can download the recording pen file.

Remind you again that you must restart the "IIS service" or wait for the workflow to take effect.

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.