Set-NAVWebServerInstanceConfiguration

Changes a configuration value for a Business Central Web Server instance.

Syntax

Set-NAVWebServerInstanceConfiguration
   [-WebServerInstance] <String>
   [-KeyName] <String>
   [-KeyValue] <String>
   [[-SiteDeploymentType] <String>]
   [[-ContainerSiteName] <String>]
   [<CommonParameters>]

Description

Each web server instance has a configuration file called the navsettings.json file, which is stored in the physical path of the web server instance. This file contains several key-value pairs that configure various settings. The key-value pairs have the format 'KeyName': 'KeyValue', such as 'ClientServicesCredentialType': 'Windows'. You can use this cmdlet to change the value of any key in the configuration file. The changes will be applied to the web server instance automatically because the application pool is recycled. When the application pool is recycled by the IIS, static state such as client sessions in the Business Central Web client will be lost.

Examples

EXAMPLE 1

Set-NAVWebServerInstanceConfiguration -WebServerInstance BC -KeyName ClientServicesCredentialType -KeyValue NavUserPassword

This example sets the 'ClientServicesCredentialType' configuration setting to 'NavUserNamePassword'.

Parameters

-ContainerSiteName

Specifies the name of the container website that the SubSite-type web server instance belongs to. This setting is only used if SiteDeploymentType has been set to 'SubSite'. If the subsite is under the default container website 'Business Central [Version] Web Client' then you can omit this parameter.

Type:String
Position:5
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-KeyName

Specifies the configuration key name as it appears in the web server instance's configuration file (navsettings.json).

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-KeyValue

Specifies configuration key value.

Type:String
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SiteDeploymentType

Specifies the deployment type of web server instance. There are two possible values: SubSite and RootSite.

  • Use SubSite if the web server instance was created as a subsite (web application) to a container website. If you specify SubSite, you will have to set the -ContainerSiteName parameter. If the subsite is under the default container website 'Business Central [Version] Web Client' then you can omit this parameter.
  • RootSite if the web server instance was created as a root-level website.
Type:String
Position:4
Default value:SubSite
Accept pipeline input:False
Accept wildcard characters:False
-WebServerInstance

Specifies the name of the web server instance in IIS.

Type:String
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False