Loading ...

ASP.NET: Enable Gzip compression via web config | CodeAsp.Net


Comments (2)

user501923  said:
Hi. Thanks for the post.
I tried this with my wcf but it seems not working. I dont see any compression in the fiddler.
Do I have to do anything else for WCF?
user246178  said:
I tried this on my server and could not get compression to work for json until I did the following:set the changes in ApplicationHost.config file via appCmd.exeAlso, I had to set mimeType to 'application/json; charset=utf-8' since that was the content-type being returned by my server.So, full command:appcmd.exe set config -section:system.webServer/httpCompression /+"dynamicTypes.[mimeType='application/json; charset=utf-8',enabled='True']" /commit:apphostAfter this, I see encoding-type: gzip in my server http response header

Top posts

Most Recent Blogs

Quick Vote

What kind of email newsletter would you prefer to receive from CodeAsp.Net?