OrchardCore: Response Compression causes content encoding error on tenants

Describe the bug

Enabling Response Compression on a different tenant other than the Default one causes content encoding error on that tenant’s homepage.

To Reproduce

Steps to reproduce the behavior:

  1. Go to Dashboard -> Configuration -> Tenants
  2. Click on Add Tenant and create a new tenant.
  3. Setup the newly created tenant (let’s call it example tenant).
  4. Go to the example tenant’s Dashboard -> Configuration -> Features and enable Response Compression.
  5. Go to the example tenant’s homepage (~/exampleTenant). OR go back to the default tenant’s Dashboard -> Configuration -> Tenants and click on the example tenant’s View button.
  6. See that the page doesn’t load, and there is a content encoding error.

Expected behavior

Tenants should not have content encoding errors on the homepage after enabling Response Compression.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

So in my case was caused by enabling Projects and Solutions > ASP.NET Core > CSS Hot Reload

Upgrading to Visual Studio 2022 17.1.0 fixed the issue

And if in place of /tenant1 I add an ending slash /tenant1/ it works

I could repro 😉

Encoding issue

There’s pretty much nothing in that ResponseCompression module either than we enable the ASP.Net middleware.