SharePoint 2019 IIS Compatibility

There is a known issue with SharePoint Server 2019 where items in document libraries might be returned with an incorrect mime-type from the server. This can lead to browsers ignoring files hosted in SharePoint libraries.

A hot fix for this is currently in the works but a very easy workaround exists which resolves the issue.

Update: this issue has been resolved with July 2019 CU.

Background:

The issue is caused by the fact that SharePoint fails to read the mime information from the IIS configuration due to a problem in our product.

As announced earlier SharePoint has modernized its integration with IIS by removing all dependencies on the legacy IIS6 APIs. SharePoint now uses the IIS7+ APIs to manage IIS, which are the latest and best supported APIs from the IIS team.

As a result of this change, the following Windows Server features will no longer be installed by the SharePoint prerequisite installer:

  • IIS 6 Management Compatibility (Web-Mgmt-Compat)
  • IIS 6 Metabase Compatibility (Web-Metabase)
  • IIS 6 Scripting Tools (Web-Lgcy-Scripting)

This change was necessary as the Windows Team announced that they are deprecating the above listed components and they might get removed from Windows Server in future releases.

The incorrect mime types in SharePoint are caused by the fact that one internal method still uses the IIS 6 metabase compatibility API to read the mime types from the IIS configuration and fails as the required prerequisits are not installed. A hotfix is in the works to remove this remaining dependency on IIS 6 compatible functionality.

Workaround:

The issue can be resolved by installing the IIS 6 Metabase Compatibility windows feature either through Server Manager UI or using the following PowerShell commands:

import-module servermanager
install-windowsfeature web-metabase

For more information refer to the following article:

https://blog.stefan-gossner.com/2018/11/30/common-issue-sp2019-items-in-document-libraries-are-downloaded-with-mime-type-application-octet-stream-rather-than-the-accurate-one/