Optimizing Microsoft Dynamics CRM 2011 Using HTTP Compression

Topics:

How to:

Internet Information Service (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 the server. MS CRM responses are not compressed by default by IIS. They have the following mimetype:

application/soap+xml;charset=UTF-8

With HTTP compression enabled, you can see up to a 30% reduction in response size. This is shown by analyzing network traffic before and after it is enabled.

Note: Do not enable compression in IIS if you are using an external compression utility.

Procedure: How to Enable Compression Using a Command Line

To enable compression using a command line:

  1. Open the Command Prompt on the MS CRM Server.
  2. 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
  3. Reset IIS for the setting to take effect.

Procedure: How to Enable Compression Manually

To manually enable compression:

  1. On the MS CRM Server, navigate to the applicationHost.config file (for example, C:\Windows\System32\Inetsrv\Config\applicationHost.config) and open it using any text editor.
  2. Locate the section “<httpCompression directory=”, its child node, “<dynamicsTypes>”, and its entry, <add mimeType="application/x-javascript" enabled="true" />, and add the following line below it:
    <add mimeType="application/soap+xml; charset=UTF-8? enabled="true" />
  3. Save the file and reset IIS for the setting to take effect.

Procedure: How to Enable Compression in IIS Using Configuration Editor

To enable compression in IIS using the Configuration Editor:

  1. Open IIS on the MS CRM Server.
  2. Open the Configuration Editor and navigate to system.webServer/httpCompression, as shown in the following image.
  3. Select and right-click dynamicTypes, and click Open to add the new mimeType.
  4. Click Add to add a new item, and enter the following mimeType:
    application/soap+xml; charset=UTF-8
  5. Enable the mimeType and close the window.
  6. 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.

Internalization

iWay Application Adapter for Microsoft Dynamics CRM 2011 On-Premises can operate MS CRM with different locales. It also supports special characters such as dollar or euro signs, copyrights, trade mark, and other symbolic characters. To avoid any problems with non-Latin symbols, MS CRM must be configured to use UTF-8 encoding, which is the default setting.

Known Runtime Issues

This section lists and describes known runtime issues for the iWay Application Adapter for Microsoft Dynamics CRM 2011 On-Premises.

  • Some entities, such as ColumnSet, may not completely restrict columns. MS CRM 2011 can return fields that are not explicitly specified in a request. The most common instances involve:
    • Activity entity columns to, from, cc, and bcc are returned even if they are not enumerated in the list of requested columns.
    • transactioncurrencyid is returned when any field of Money type is requested.
  • Fields that are optional, according to metadata, are required by MS CRM 2011. The following table describes the list of fields.

    Entity

    Attribute

    importfile

    targetentityname

    columnmapping

    targetattributename

    lookupmapping

    columnmappingid, transformationparametermappingid

    connection

    record1id, record2id

    salesorderdetail

    productid, uomid, productdescription

    quotedetail

    productid, uomid, productdescription

    invoicedetail

    productid, uomid, productdescription

  • Some fields are declared as required, but MS CRM 2011 processes messages successfully when the fields are not populated. An example of this is the field with the entity name email and its attribute of messageiddupcheck.
  • Compound operations are not executed in a transaction, causing some records to be created while the rest are not created. The total result of this type of request execution will be Fail.
  • The RetrieveMultiple adapter request schemas are different from the MS CRM SDK definition. The Root query type is QueryExpression. This implementation is used because all other query types can be represented by this type.
  • Some operators that are available for conditions in RetrieveMultiple request are not currently supported by MS CRM 2011, such as Contains, DoesNotContain, and NotOn. They are automatically eliminated from the generated schema.
  • A process (workflow), which contains the execution of a child process (workflow), returns a response that contains entity details that are updated according to the main process (workflow) only. The details of the entity affected by the child process (workflow) cannot be returned because the process (workflow) log of the main process (workflow) contains only the GUID of the child process (workflow), without additional information needed to get the process (workflow) log for the child entity.
  • For the operations SearchByBody, SearchByTitle, SearchByKeywords (Article entity), and Rollup, the element QueryExpression (Query for Rollup operation) must be of type QueryExpression only. It is used for filtering attributes by specifying the ColumnSet element only.
  • For all advanced operations, the element Value under the complex type OptionSetValue must be treated as mandatory for input, although it is represented as optional in schemas.
  • In Operations, invoice.SetRelated and invoice.RemoveRelated, the element EntityReference should have two and only two occurrences (minOccurs=2 and maxOccurs=2) in schema representation. Only when this condition is satisfied will the operation execute successfully.
  • The element Principal under the PrincipalAccess complex type should be considered mandatory, although it is represented as optional in schemas.
  • Distinct does not work in roll-up operations for the Order entity.
  • Formatted values that contain currency symbols can also contain broken characters if the encoding of the system is not UTF-8. These symbols represent currency symbol and offset values. To avoid this issue, use UTF-8 encoding (default for MS CRM 2011 instances) for XML request files. In this case, UTF-8 encoded responses with valid formatted values will be produced.
  • All parameters for advanced operations are declared as optional in schemas. Some parameters may be required, and MS CRM 2011 will not perform the operations without them. During design time, it is not possible to determine what is optional or required because MS CRM 2011 does not provide information about mandatory fields. As a result, it is not possible to set proper minOccurs attributes in the schemas.
  • When an MS CRM 2011 Organization is disabled, MS CRM 2011 returns a status code of 200. This code is not processed in a special way. If you receive a status code of 200, then consult your system administrator.
  • In the Bulk Delete message, ColumnSet, Distinct, and Paging Info values are not evaluated during processing. Only ConditionExpression and LinkEntities function in this request.
  • The validator may fail if a very long value is specified for elements that are not of type string. For example, some long text in a node of type integer. This is a known issue logged at:

    https://issues.apache.org/jira/browse/XERCESJ-589

    Even though this is a very rare case, if it does occur, the error will be logged and an attempt to process a request in the regular way will continue.

  • In iWay Explorer, do not use the Refresh option on a MS CRM 2011 adapter target. Using the Refresh option can lead to unpredictable results with caches and connection pools. If you need to refresh the list of entities in the adapter tree, then disconnect from the adapter target and then connect to the adapter target.
  • If a new user was created in MS CRM but did not log in first in MS CRM after connecting to a target with the current UI language selected, the target initialization may fail. The user must go to MS CRM and log in for the first time to apply the configuration. The UI language ID can also be set explicitly by the administrator. For more information, see Understanding Localization.