इसके माध्यम से साझा किया गया


Configuring a Microsoft Dynamics NAV Web client Instance for the Web Client

You can create a Dynamics NAV Web Server instance for the Microsoft Dynamics NAV Web client by using the Setup wizard to install the Microsoft Dynamics NAV Web client or by running the New-NAVWebServerInstance cmdlet. When you set up a web server instance, you are configuring the connection from the Microsoft Dynamics NAV Web client to the Microsoft Dynamics NAV Server instance. The connection settings, along with several other configuration settings, are saved in a configuration file for the web server instance.

About the configuration file

The name of the configuration file depends on your Dynamics NAV.

  • With Microsoft Dynamics NAV 2018, because the web server instances run on .NET Core, the configuration file for the web server instances is a .json file type called navsettings.json. The navsettings.json file is a Java Script Object Notification file type that is similar to files that use the XML file format.

  • With Microsoft Dynamics NAV 2017 and earlier, the configuration file is a .config type file called web.config.

    After installation, you can change the configuration by modifying the configuration file. There are two ways to modify this file: directly or using PowerShell.

Where to find the navsettings.json or web.config file

The navsettings.json or web.config file is stored in the physical path of the web server instance, which is by default is %systemroot%\inetpub\wwwroot\[WebServerInstanceName].

[WebServerInstanceName] corresponds to the name (alias) of the web server instance in IIS, for example, c:\inetpub\wwwroot\DynamicsNAV110.

Modify the navsettings.json or web.config file directly

  1. Open the navsettings.json or web.config in any text or code editor, such as Notepad or Visual Studio Code.

    Each setting is defined by a key-value pair.

    • In the navsettings.json file, a setting has the format:

      "keyname": "keyvalue",
      
    • In the web.config file, a setting has the format:

      <add key="keyname" value="keyvalue"/>
      
The `keyname` is the name of the configuration setting and the `keyvalue` is the value.

For example, in the navsettings.json file, the configuration setting that specifies the Windows credential type for authenticating users is:

```
"ClientServicesCredentialType":  "Windows",
```

In the web.config file, the setting is:

```
<add key="ClientServicesCredentialType" value="Windows"/>
```
Include values in double quotes.
  1. Find the configuration settings that you want to change, and then change the values.

    See the Settings section for a description of each setting.

  2. When you are done making changes, save the file.

  3. Restart the DynamicsNAV110 for the changes to take effect.

    For example, in IIS Manager, in the Connections pane, select website node for DynamicsNAV110, and then in the Actions pane, choose Restart. Or, from your desktop, run iisreset.

Modify the navsettings.json or web.config file by using the Set-NAVWebServerInstanceConfiguration PowerShell cmdlet

The PowerShell script module NAVWebClientManagement.psm1 includes the Set-NAVWebServerInstanceConfiguration cmdlet that enables you to configure a web server instance.

  1. Depending on your installation, run the Microsoft Dynamics NAV Development Shell or Windows PowerShell as an administrator.

    For more information, see Get started with the Dynamics NAV Web Server cmdlets.

  2. For each setting that you want to change, at the command prompt, run the following command:

    Set-NAVWebServerInstanceConfiguration -Server [MyComputer] -ServerInstance [NAVServerInstanceName] -WebServerInstance [MyNavWebServerInstance] -KeyName [Setting] -KeyValue [Value]
    

    Replace:

    • [MyComputer] with the name of the computer that is running the Microsoft Dynamics NAV Server
    • [NAVServerInstanceName] with the name of the server instance, such as DynamicsNAV110.
    • [MyNavWebServerInstance]with the name of the web server instance for the Microsoft Dynamics NAV Web client.
    • [KeyName] with the name of the setting. Refer to the next section in this article.
    • [KeyValue] with the new value of the setting.

Settings in the navsettings.json

The following table describes the settings that are available in the navsettings.json.

Important

If modifying the file directly, place values in double quotes "".

Setting/KeyName Description
AllowedFrameAncestors Specifies the host name of any web sites in which the Microsoft Dynamics NAV Web client or parts of are embedded. By default, the Microsoft Dynamics NAV Web client will not allow a website to display it inside an iframe unless the website is hosted on the same web server. This value of this setting is a comma-separated list of host names (URIs). Wildcard names are accepted. For example: https:mysite.sharepoint.com, https:*.myportal.com

For more information, see Embedding Microsoft Dynamics NAV Web Client Pages in Other Websites
GlobalEndPoints Specifies the comma-separated list of global endpoints that are allowed to call this website. The values must include http scheme and fully qualifies omain name (FDQN), such as https://financials.microsoft.com.
AllowNtlm Specifies whether NT LAN Manager (NTLM) fallback is permitted for authentication.

To require Kerberos authentication, set this value to false.

Values: true, false

Default value: true
ClientServicesChunkSize Sets the maximum size, in kilobytes, of a data chunk that is transmitted between Microsoft Dynamics NAV Web client and Microsoft Dynamics NAV Server. Data that is transmitted between Microsoft Dynamics NAV Web client and Microsoft Dynamics NAV Server is broken down into smaller units called chunks, and then reassembled when it reaches its destination.

Values: From 4 to 80.

Default value: 28
ClientServicesCompressionThreshold Sets the threshold in memory consumption at which Microsoft Dynamics NAV Web client starts compressing data sets. This limits amount of consumed memory. The value is in kilobytes.

Default value: 64
ClientServicesProtectionLevel Specifies the security services used to protect the data stream between the Microsoft Dynamics NAV Web client and Microsoft Dynamics NAV Server. This value must match the value that is specified in the Microsoft Dynamics NAV Server configuration file. For more information, see Configuring Microsoft Dynamics NAV Server.

Values: EncryptAndSign, Sign, None

Default value: EncryptAndSign
Server Specifies the name of the computer that is running the Microsoft Dynamics NAV Server.

Default value: localhost
ServerInstance Specifies the name of the Microsoft Dynamics NAV Server instance that the Microsoft Dynamics NAV Web client connects to.

For more information, see Managing Microsoft Dynamics NAV Server Instances.

Default value: DynamicsNAV110
ClientServicesCredentialType Specifies the authorization mechanism that is used to authenticate users who try to connect to the Microsoft Dynamics NAV Web client. For more information, see How to: Configure Authentication of Microsoft Dynamics NAV Web Client Users and Users and Credential Types.

The credential type must match the credential type configured for the Microsoft Dynamics NAV Server instance that the Microsoft Dynamics NAV Web client connects to. For information about how to set up the credential type on Microsoft Dynamics NAV Server, see Configuring Microsoft Dynamics NAV Server.

Values: Windows, UserName, NavUserPassword, AccessControlService

Default value: Windows
ClientServicesPort Specifies the TCP port for the Microsoft Dynamics NAV Server. This is part of the Microsoft Dynamics NAV Server’s URL.

Values: 1-65535

Default value: 7046
ServicePrincipalNameRequired If this parameter is set to true, then the Microsoft Dynamics NAV Web 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 Microsoft Dynamics NAV Web client attempts to connect to the configured Microsoft Dynamics NAV Server service, regardless of whether that service is associated with an SPN.

For more information about SPNs, see How to: Configure Delegation for Microsoft Dynamics NAV Web Client.

Default: false
SessionTimeout Specifies the maximum time that a connection between the Microsoft Dynamics NAV Web client and the Microsoft Dynamics NAV Server can remain idle before the session is stopped.

In the Microsoft Dynamics NAV Web client, this setting determines how long an open Dynamics NAV page or report can remain inactive before it closes. For example, when the SessionTimeout is set to 20 minutes, if a user does not take any action on a page within 20 minutes, then the page closes and it is replaced with the following message: The page has expired and the content cannot be displayed.

The time span has the format [dd.]hh:mm:ss[.ff]:

- dd is the number of days
- hh is the number of hours
- mm is the number of minutes
- ss is the number of seconds
- ff is fractions of a second

Default value: 00:20:00
ShowPageSearch Specifies whether to show the Search for Page or Report icon in the ribbon pane of the Role Center. The Search for Page or Report lets users find Dynamics NAV objects, such as pages, reports, and codeunits. Note: The Search for Page or Report option only finds objects that are available from the Departments page in the Microsoft Dynamics NAV Windows client.

If you do not want to the Search for Page or Report icon available in the Microsoft Dynamics NAV Web client, then set the parameter to false.

Default value: true
UnknownSpnHint Specifies whether to use a server principal name when establishing the connection between the Microsoft Dynamics NAV Web client server and Microsoft Dynamics NAV Server. This setting is used to authenticate the Microsoft Dynamics NAV Server, and it prevents the Microsoft Dynamics NAV Web client server from restarting when it connects to Microsoft Dynamics NAV Server for the first time. You set 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/DynamicsNAV110/Service)=NoSpn

If you set this key to the incorrect value, then during startup, the Microsoft Dynamics NAV Web client will automatically determine a correct value. This will cause the Microsoft Dynamics NAV Web client to restart. Note: For most installations, you do not have to change this value. Unlike the Microsoft Dynamics NAV Windows client, this setting is not updated automatically. If you want to change the default value, then you must change it manually.
DnsIdentity Specifies the subject name or common name of the service certificate for Microsoft Dynamics NAV Server.

This parameter is only relevant when the ClientServicesCredentialType is set to UserName, NavUserPassword, or AccessControlService, which requires that security certificates are used on the Microsoft Dynamics NAV Web client and Microsoft Dynamics NAV Server to protect communication. Note: You can find the subject name by opening the certificate in the Certificates snap-in for Microsoft Management Console (MMC) on the computer that is running Microsoft Dynamics NAV Web client or Microsoft Dynamics NAV Server.

For more information, see How to: Configure Authentication of Microsoft Dynamics NAV Web Client Users.

Value: The subject name of the certificate.

Default value: none
SigninHelpLink Specifies the URL to open if the user selects help on the sign in dialog.

Default value: none
HelpServer Specifies the name of the Dynamics NAV Help Server that the Microsoft Dynamics NAV Web client must connect to, such as MyServer.

Default value: none
HelpServerPort Specifies the TCP port on the specified Dynamics NAV Help Server that the Microsoft Dynamics NAV Web client can access Help through, such as 49000.

Default value: none
Feedback Link Specifies the URL to a feedback system for gathering end-user feedback about the application.
Community Link Specifies the URL to a community or resource for sharing information.
Privacy Link Specifies the URL to the privacy information for the application. This link also appears in the sign-in page.
Legal Link Specifies the URL to the legal information about application.
Sign In Help Link This link appears on the sign-in page. It specifies the URL to a resource that provides information to help the user sign in the Dynamics NAV application.
PersonalizationEnabled Specifies whether personalization is enabled in the Microsoft Dynamics NAV Web client. Set to true to enable personalization.

For complete instructions about how to enable personalization, see Enable/Disable Personalization.

See Also

How to: Set Up Multiple Web Server Instances for the Microsoft Dynamics NAV Web Client
How to: Install the Web Server Components
Deploying the Microsoft Dynamics NAV Web Server Components
Configuring Microsoft Dynamics NAV Server