Enable WCF Compression to Improve CRM 2011 Network Performance

If you have ever analyzed network traffic you would notice that IIS will automatically compress many types of content including images, jscript, and css pages. Compression is used improve the network performance by decreasing the number of round trips required to transfer data from the server to the client machine.

The CRM 2011 Outlook client uses WCF to retrieve data from the server. By default IIS will not compress WCF responses which have a mimeType of  'application/soap+xml;charset=utf-8'.  Since the WCF traffic is not compressed you may notice there is increased network traffic or performance is degraded when comparing CRM 2011 to CRM 4.0.  Typically I have seen a 30-40% reduction in response size once compression is enabled for the WCF responses. However once SSL is enabled on the CRM website the compression can reduce the size by 80-90%.

Below is a chart showing response size before and after compression is enabled within IIS. This is captured from a non-customized CRM 2011 environment with the sample data loaded. This shows improvements when loading the various views in the Outlook client.

No Compression


Compression + SSL

Activities View

Bytes Sent: 82,234

Bytes Received: 971,139

Bytes Sent: 82,234

Bytes Received: 722,786

Bytes Sent: 53,249

Bytes Received: 36,658

Accounts View

Bytes Sent: 105,084

Bytes Received: 219,102

Bytes Sent: 105,084

Bytes Received: 149,424

Bytes Sent: 67,586

Bytes Received: 25,837

Contacts View

Bytes Sent: 78,286

Bytes Received: 177,504

Bytes Sent: 78,286

Bytes Received: 122,090

Bytes Sent: 50,283

Bytes Received: 19,791

Leads View

Bytes Sent: 78,286

Bytes Received: 202,589

Bytes Sent: 78,286

Bytes Received: 141,021

Bytes Sent: 50,274

Bytes Received: 19,769

How to Enable WCF compression.

You may enable compression either by using a command line or by manually modifying the ApplicationHost.config file on the CRM Server. Below are the steps for each process.

Note: You may notice an increase in CPU utilization with compression enabled so be sure to monitor CPU accordingly.

Enable compression using a command line.

a. Open the Command Prompt on the CRM Server.

b. Run the following command:    

%SYSTEMROOT%system32inetsrvappcmd.exe set config -section:system.webServer/httpCompression /+"dynamicTypes.[mimeType='application/soap%u002bxml; charset=utf-8',enabled='true']" /commit:apphost

c. Reset IIS for the setting to take effect.    


Enable compression by manually updating the ApplicationHost.Config

a. On the CRM Server Navigate to: C:WindowsSystem32InetsrvConfigapplicationHost.config and open it with notepad.

b. Search for the Section: “<dynamicTypes>” and in that section you should fine an entry that looks like this:
<add mimeType="application/x-javascript" enabled="true" />

c., Below that, add the following line:
<add mimeType="application/soap+xml; charset=utf-8" enabled="true" />

d. Save the file and reset IIS for the setting to take effect.


Note: For additional information about configuring HTTP compression, on TechNet, see the article Configuring HTTP Compression in IIS 7 at: http://technet.microsoft.com/en-us/library/cc771003(WS.10).aspx

The Optimizing and Maintaining the Performance of a Microsoft Dynamics CRM 2011 Server Infrastructure whitepaper also includes a section on HTTP compression .


Jeremy Morlock

Microsoft Premier Field Engineer

Comments (9)

  1. Alex says:

    Any particular reason why SSL so vastly improves the compression rate?

  2. Matt says:

    I have the same question as Alex.  Why does SSL improve the compression rate so much?  Usually SSL adds overhead.

  3. JMorlock says:

    When looking at the HTTP form of the WCF traffic there is additional data included in each request which does not compress well. Once SSL is enabled that additional data is not included with the request and the remaining contents can be compressed.

  4. tmercer says:

    Wondering if this also applies to CRM 2013. Will we see the same results?

  5. CRMDUDE says:

    I have configured this but WCF traffic still does not compress. It works fine on some environments, but I have two servers that it simply does not work on.  Any recommendations?

  6. JMorlock says:

    WCF compression will also apply to CRM 2013. I am working on another blog that shows the improvements in CRM 2013 including how performance is impacted for remote users.

    If the compression is enabled and shows up in the DynamicsTypes section then its possible that a load balancer or other appliance on the network could be decompressing the traffic.

  7. Rotor says:

    Can you please elaborate on "there is additional data included in each request which does not compress well. Once SSL is enabled that additional data is not included with the request"? What exactly is this data? Negotiation headers? Thanks a lot!

  8. Marcus Naylor says:

    Can you provide the extra steps, or link to enable SSL.  Thanks

Skip to main content