Common issue: SP2019 – Items in document libraries are downloaded with mime-type application/octet-stream rather than the accurate one

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.

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

References:

14 Comments


  1. Hi,
    will the fix do something different or are we still stuck with IIS6 legacy? Will we have to clean up after this workaround when we install the fix?

    Reply

    1. Hi Piotr,
      my current understanding is that the plan is to remove the dependency which would allow you to remove these IIS 6 compatible windows features after the fix is installed.
      Cheers,
      Stefan

      Reply

  2. Hi Stefan
    Do you have any News about this issue?
    Cheers
    Andrea

    Reply

    1. The fix is still in development. If you are interested to be informed when the fix is available I would recommend to open a support case with Microsoft.

      Cheers,
      Stefan

      Reply

  3. Hi Stefan,
    Do you know when the fix will be release ?

    Reply

    1. As you can see in the article above the issue was fixes with July 2019 CU.

      Reply

  4. This issue has been fixed with SharePoint Server 2019 July 2019 CU.

    Reply

  5. I have installed the July 2019 CU on 4 different SharePoint 2019 environments, from single server to an 8 server farm and the July 2019 CU did not fix this problem on any of these environments.

    Reply

    1. Hi John,
      in this case I would recommend to open a support case with Microsoft to get the issue analyzed.
      Cheers,
      Stefan

      Reply

  6. Does this apply to modern pages as well, or just classic pages? It is working for classic pages, but not on modern.

    Reply

    1. Hi Leonard,
      afaik this applied to both but this has been fixed already with July 2019 CU.
      Cheers,
      Stefan

      Reply

  7. Unfortunately, the issue still exist, tried the latest October update [KB 4486676, KB 4486675]
    And the workaround didn’t work for me.

    Reply

    1. Hi Muhammad,
      the issue has been resolved more than a year ago.
      In addition if the workaround does not work the issue is completely unrelated from the issue discussed in this blog.
      I would recommend to open a support ticket to get this investigated.
      Cheers,
      Stefan

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.