An issue which has been reported several times since SharePoint Server 2019 was released is that items in document libraries might be returned with incorrect mime-type from the server. This can lead to effects that browsers ignore CSS files hosted in SharePoint libraries, that images are not displayed and various other unexpected results.
A hotfix 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.
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.
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