February 20, 2012 8 Comments
IIS automatically compresses many types of content including script, images and css files to help improve network performance by minimizing the amount of data required to be transferred between the client and server. WCF responses which have a mimetype of ‘application/soap+xml;charset=utf-8’ are not compressed by default by IIS.
Dynamics CRM 2011 Outlook client uses WCF to retrieve data from the server and minimizing the network traffic across these clients especially when there are a large number of Dynamics CRM Outlook client users can have a positive impact on network load freeing up resource for other processes.
With WCF compression enabled you may see up to 30% reduction in response size and you can discover this by analyzing network traffic before and after it is enabled. The largest benefit that can be obtained from compression is by enabling SSL for your Dynamics CRM deployment, even for on-premise. Using SSL you may be able to gain an 80% reduction in the response size for your Dynamics CRM Outlook clients. The side effect to all of this is the impact on server resource in particular CPU when it performs the compression and with SSL, the encryption. Therefore it may not provide benefits in every scenario though weighing up the different aspects of your environment including the amount of users, and performance testing these features may show a positive increase in network performance.
Enable compression using a command line
- Open the Command Prompt on the CRM Server.
- Run the following command:
%SYSTEMROOT%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpCompression /+”dynamicTypes.[mimeType='application/soap+xml; charset=utf-8',enabled='true']” /commit:apphost
- Reset IIS for the setting to take effect.
Enable compression by manually updating the ApplicationHost.Config
- On the CRM Server Navigate to: C:\Windows\System32\Inetsrv\Config\applicationHost.config and open it with notepad.
- Locate the Section: “<httpCompression directory=” and in that section find a child node titled <dynamicsTypes> and an entry that looks like this:
- Below that, add the following line:
<add mimeType=”application/soap+xml; charset=utf-8″ enabled=”true” />
- Save the file and reset IIS for the setting to take effect.
Enable Compression in IIS using Configuration Editor
- Open IIS on the CRM Server
- Open Configuration Editor and navigate to the system.webServer/httpCompression Section
- Choose dynamicTypes and open to add the new mimeType
- Add a new item and enter application/soap+xml; charset=utf-8 as the mimeType.
- Enable the mimeType and close the window.
- Select Apply on the Configuration Editor and then reset IIS for the setting to take effect.
Note: Ensure you test this thoroughly in a test environment before configuring your production environment with this setting.