0

I have a strange issue, whereby I have a Visual Studio .Net 4.8 Web API project which has gzip compression enabled in the web.config (and uses an attribute to compress the response). This had been tested and works perfectly when run locally.

When I deploy to Azure, compression works from my dev app service, but not when the exact same code is deployed to my production app service it doesn't compress. The response doesn't have a "Content-Encoding" entry at all for some reason on production.

I've checked the web.config deployed to both and they're the same (aside from the DB connection strings), as are the application settings in the web.config and Azure portal.

The only difference between the two is that the production service was created as an Azure "API App" whereas the dev service is a "Web App". They are also both on different pay tiers (production is S2 whereas dev is B1).

I've found the applicationHost.config file and checked it - the static and dynamic compression are active, support the necessary application/json type and are almost identical between the production and dev services.

From what I've read, Microsoft claim there is no difference between Web Apps and API Apps, but I wonder if maybe the API App is more limited in some way or doesn't support compression.

Has anyone has this issue before, or have any suggestions on how I can check the actual gzip options on the service?

0 Answers0