Error message when you visit a Web site that is hosted on a server that is running Internet Information Services 7.0: "HTTP Error 406 - Not Acceptable"

Symptoms

Consider the following scenario. You have a Web site that is hosted on a server that is running Internet Information Services (IIS) 7.0. When a user visits the Web site, the user receives an error message that resembles the following error message:
Server Error in Application "application name"
HTTP Error 406 - Not Acceptable
HRESULT: 0

Cause

This problem occurs because the MIME type that is specified in the Accept header of the client request does not match the MIME type that is specified for the requested content file name extension on the server.

Resolution

To resolve this problem, make sure that the Accept header of the client request matches the MIME type that is specified for the requested content file name extension on the server. To do this, follow these steps:
  1. Start IIS Manager. To do this, click Start, click Run, type inetmgr.exe, and then click OK.
  2. In IIS Manager, expand the server name, expand Web sites, and then click the Web site that you want to modify.
  3. In Features View, double-click MIME Types.
  4. Double-click the MIME type that you want to modify.
  5. In the Edit MIME type dialog box, type the appropriate MIME type for the content file name extension in the MIME Type box.

    Note You can also set the MIME type of the content file name extension to */* to accept any MIME type.
属性

文章 ID:942050 - 上次审阅时间:2007年10月8日 - 修订版本: 1

反馈