Friday, January 15, 2016

Let us understand the ClientUserSettings.config file in Detail

ClientUserSettings config file logo in Microsoft Dynamics NAV


First of all, let's understand what the ClientUserSettings.config file does. When you first install the Microsoft Dynamics NAV Windows Client, the Specify parameters page in Microsoft Dynamics Setup asks you for the configuration information to enable the Microsoft Dynamics Windows Client to connect to Microsoft Dynamics NAV Server. This information is saved in ClientUserSettings.config file.


Where is it located?

A separate instance of the ClientUserSettings.config file is maintained in each user of the Computer. The default location of the file is C:\Users\<user name>\AppData\Roaming\Microsoft\Microsoft Dynamics NAV\<LS Version> where <user name> is the name of the User and <LS Version> is the Version of LS installed on your systems. The folders and files are by default hidden. You have to unhide the folders and files from the folder options to view them.


When this file is required to be configured?

When we install Microsoft Dynamics NAV Setup for the first time, the default configuration that you have provided at the time of setup, stores inside the ClientUserSettings.config file. 

The file is required to be configured when you want different setup for the different users of the computer. This file also needs to changed for the future users of the computer.  ClientUserSetting.config file is a .xml file which can be edited using any text editor. 


ClientUserSettings.config file Parameters in Details

Now that we have understood where and when we have to use the ClientUserSettings.config file. We must know the parameters of the ClientUserSettings.config file in detail for the settings. Below are the list of the Settings need to be configured in ClientUserSettings.config file:


  • Server: Specifies the name of the computer that is running Microsoft Dynamics NAV Server for this client.
Default value: Empty string if you installed by using the Client installation option, or localhost if you installed by using the Developer Environment installation option or a custom installation.


  • ClientServicesPort: Specifies the listening TCP port for the Microsoft Dynamics NAV Server instance that the client connects to.

Default value: 7046

  • ServerInstance: Specifies the name of the Microsoft Dynamics NAV Server instance that the client connects to.

Default value: DynamicsNAV80

  • TenantID: Specifies the tenant that the clie-nt connects to in a multitenant deployment. 

Default value: ""

  • ClientServicesProtectionLevel: Specifies the security services for protecting the client/server data stream. This value must match the value that is specified in the Microsoft Dynamics NAV Server configuration file. 

Default: EncryptAndSign
Values: EncryptAndSign, Sign, None

  • UrlHistory: Specifies a comma-delimited list of Microsoft Dynamics NAV Server connections that is displayed in the Select Server window when you choose the drop-down arrow in the Server name field.
This parameter is not available after you install the Microsoft Dynamics NAV Windows client, but it is created and populated after the user enters a server name in the field. You can create and populate this field after you install the Microsoft Dynamics NAV Windows client. This gives the user a list of servers from which to choose.

Example: 
<add key="UrlHistory" value="localhost, user:7046/DynamicsNAV80, name:7046/DynamicsNAV80"/>
Each value must contain a computer name and can optionally also include a port number and a Microsoft Dynamics NAV Server instance. Defaults are assumed if either value is missing.

  • ClientServicesCompressionThreshold: Specifies the threshold in memory consumption at which the Microsoft Dynamics NAV Windows client starts compressing datasets, in kilobytes.

Default: 64

  • ClientServicesChunkSize: Specifies the default size for a chunk, in kilobytes.

Default: 28.
The range of values is from 4 to 80.

  • ClientServicesKeepAliveInterval: Specifies the time (in seconds) between reliable session messages that are automatically sent to Microsoft Dynamics NAV Server to keep the session alive during periods of inactivity. If Microsoft Dynamics NAV Server is located behind a load balancer, then we recommend that you set this value to approximately half of the load balancer's idle timeout.

Default: 120

  • MaxNoOfXMLRecordsToSend: Specifies the maximum number of data rows that can be sent as XML during export to Word or Excel.

Default: 5000

  • MaxImageSize: Specifies the maximum image size (in bytes) allowed by validation.

Default: 26214400

  • ClientServicesCredentialType: Specifies how Microsoft Dynamics NAV Windows client users are authenticated when they connect to Microsoft Dynamics NAV Server. This parameter value must be the same as the Credential Type setting for the Microsoft Dynamics NAV Server instance that the client is configured to connect to.

Default value: Windows

  • ACSUri: Specifies the web location where the Microsoft Dynamics NAV Windows client goes to authenticate the client user. This parameter is only relevant if the ClientServicesCredentialType is set to ACS.

Default value: ""

  • AllowNtlm: Specifies whether NTLM fallback is permitted for authentication. To require Kerberos authentication, set this value to false.

Default value: true

  • ServicePrincipalNameRequired: If this parameter is set to true, then the client can only connect to a Microsoft Dynamics NAV Server instance that has been associated with a service principal name (SPN). If this parameter is set to false, then the client attempts to connect to the configured Microsoft Dynamics NAV Server instance, regardless of whether that instance is associated with an SPN.

Default: false

  • ClientServicesCertificateValidationEnabled: Specifies whether to enforce validation of the certificate. In a production environment, setting this parameter to true is strongly recommended. When validation is enabled, the certificate must be trusted, not revoked, and the CN name should match the URL of your service. When validation is disabled, you can use a self-signed certificate without a revocation list and no constraint on the CN name.

Default: true

  • DnsIdentity: Specifies the subject name of the service certificate for Microsoft Dynamics NAV Server. The Microsoft Dynamics NAV Windows client makes sure that the certificate that is provided during the SSL handshake contains a Domain Name System (DNS) or CommonName (CN) attribute that is equal to the DNS identity of the client. This check is performed in addition to determining the validity of the server certificate.

Default: ""

  • HelpServer: Specifies the name of the computer than hosts the Microsoft Dynamics NAV Help Server.
  • HelpServerPort: Specifies the TCP listening port for the Microsoft Dynamics NAV Help Server.

Default: 49000

  • UnknownSpnHint: Specifies whether to use server principal name when establishing the connection between the Microsoft Dynamics NAV Windows client and Microsoft Dynamics NAV Server. This setting is used to authenticate the Microsoft Dynamics NAV Server. You set the values that are based on the value of the ServicePrincipalNameRequired key.

Value: The value has the following format.
(net.tcp://NavServer:Port/ServerInstance/Service)=NoSpn|SPN

    •  NavServer is the name of the computer that is running the Microsoft Dynamics NAV Server.
    • Port is the port number on which the Microsoft Dynamics NAV Server is running.
    • ServerInstance is the name of the Microsoft Dynamics NAV Server instance.
    • NoSpn|SPN specifies whether to use an SPN. If the ServicePrincipalNameRequired key is set to false, then set this value to NoSpn. If the ServicePrincipalNameRequired key is set to true, then set this value to Spn.
Default value: (net.tcp://localhost:7046/DynamicsNAV80/Service)=NoSpn 
This setting is updated automatically.


I hope you have read all the parameters in detail and understood what the ClientUserSettings.config file does. Now that you have understood the Settings in Detail, let's configure the ClientUserSettings.config file to run RTC using NavUserPassword or Windows Authentication. 

If you still have any query then ask you questions on the comments section below. 

Have a Nice Day!

2 comments: