This page lists all settings found in the appsettings.json file for the Blazor WebClient Server.
The appsettings.json file is located in the following directory: ..\<AMT root>\Apps\<Application>\ClientBlazor\WebClient\Server\.
| Note: the appsettings.json file name is case sensitive and must be lowercased. |
The appsettings file is (sub-)divided into the following sections.
| Section | Description |
|---|---|
| Amt | The main section where most settings are located. |
| Logging | Section for the logging settings for the Web Application. |
| AllowedHosts | Solo settings which restricts the hosts which may access the Web Application. |
Sets the runtime behaviour to either Lion, Cobol or Natural.
For AMT COBOL applications this should be set to Cobol.
"RuntimeBehaviour": "Cobol",The HTTP request timeout in seconds.
"HttpRequestTimeout": 7200,The number of seconds between keepalive calls to the client, the default value is 60.
"KeepAliveInterval": 60,By default the maximum size of data uploaded to the AMT Blazor WebClient is limited to 10240 kilobytes (10
megabytes) per HTTP request.
To increase the upload size the MaxRequestLength setting can be increased.
Note
that this setting limits the whole HTTP request, not just the file(s) to be uploaded, meaning that the limit should
be set higher than the maximum intended file size.
This setting controls the upload limit in kilobytes, it is a 32 bit integer which limits the setting to a maximum value of 2147483647.
"MaxRequestLength": 10240,| The default CSS files will loaded before the custom theme
(unless NoDefaultTheme is set to True). If Theme is set to a value, this custom theme will be loaded as separate CSS files which will override the default CSS styling. |
"Theme": "MyTheme",
"NoDefaultTheme": false,When set to true, the Menu bar at the top of the application will be hidden. (AMT Lion only)
"HideMainMenu": false,If an application is an AMT for CSharp application (Visual Studio) that uses static webpages, this setting should be set to true.
"IsVSApplication": false,ObjectFields are editboxes which can be used in both LoadAndRun and Customize scripts.
If editboxes are set as ObjectFields, they will not be displayed on runtime. Enter the AMT names of the editboxes delimited by a semicolon(;).
ObjectFields: The names of the object fields which will not be displayed on runtime.
"ObjectFields": "TESTFIELD1;TESTFIELD2",The LoadAndRun JavaScript script is a customer specific customization created during migration which can modify the
values to and from an AMT web client form by hooking into a form at certain loading stages on runtime.
The LoadAndRun script can be enabled with these settings.
See CustomizeJS and LoadAndRun.
LoadAndRun: Setting the value to "true" will enable the LoadAndRun script for the application.
LoadAndRunJs: The name and location of the script relative to the wwwroot\scripts folder of the web client.
"LoadAndRun": true,
"LoadAndRunJs": "loadandrun",If a client specific customize JavaScript script was created for an application during migration, it can be enabled with these settings.
See CustomizeJS and LoadAndRun.
LoadCustomize: Setting the value to "true" will enable the customize script for the application.
CustomizeJs: The name and location of the script relative to the wwwroot\scripts folder of the web client.
"LoadCustomize": true,
"CustomizeJs": "customize",When set to true, the AmtExceptionPage provides additional error information.
"AdditionalErrorDetails": false,These options can be set if additional javascript files are required in the Web Client.
LoadAdditionalJavascripts: Setting the value to "true" will activate the javascript files set in the
AdditionalJavascripts setting.
AdditionalJavascripts: The location of the scripts relative to the wwwroot\scripts folder of
the web client, multiple scripts can be entered if separated by a semicolon (;). The .js file extension should not be included.
"LoadAdditionalJavascripts": true,
"AdditionalJavascripts": "Javascript1;Javascript2",UseNotifyBar enables or disables a notification bar in the web client.
When messages are send to the station of a user, a notification bar will appear to display the message and disappear after a set time. The default value is true.
With NotifyBarTime the default visibility duration of the bar can be changed by setting a time in seconds, the default value is 120 seconds (2 minutes).
Alternatively the notification bar can be closed manually by clicking the close button on the bar.
"UseNotifyBar": true,
"NotifyBarTime": 120Settings needed to communicate with the Blazor WebAPI.
Protocol: The protocol to be used for the Blazor WebAPI, either Https or Http.
Domain: This setting should contain the URL of the Blazor WebApi website without the protocol prefix.
Port: Set to 0 for normal operations. Other values are used for debugging. The port setting is used when debugging Blazor locally without IIS. Set to 0 when hosted on IIS.
"BlazorWebApi": {
"Protocol": "Https",
"Domain": "<domain>[:port]/<path>",
"Port": 0,
},The authentication type used to log into the Blazor WebClient, the only valid option is "OIDC" (OpenID Connect).
"AuthenticationType": "OIDC",This section holds the settings for OpenID Connect authentication.
preferred_username is used as claim type."AmtOIDC": {
"OIDC": {
"ClientId": "amt-blazor-webclient-server",
"Authority": "https://login.example.org/amt-applications/v2/auth",
"Scope": [ "openid profile amt-blazor-webapi-scope" ],
"ClientSecret": "c8A6L7j5E3N0n9Y",
"TokenValidationParameters": {
"NameClaimType": "preferred_username"
},
"RequireHttpsMetadata": true
},
...
}The 'CookieAuthenticationOptions' section holds settings for the cookie used for user authentication.
None if the application is used in an iframe.Undefined the default value which does not set a SameSite field, None to disable SameSite restrictions, Lax to send the cookie with "same-site" requests and with "cross-site" top-level navigation, and Strict to only send the cookie with "same-site" requests."AmtOIDC": {
...
"CookieAuthenticationOptions": {
"Cookie": {
"Name": ".Amt.Blazor.ApplicationName.Auth",
"Domain": "",
"Path": "/",
"SameSite": "None"
}
},
...
}This section holds the remaining OpenID Connect options.
RS256."AmtOIDC": {
...
"DisableRefreshTokens": false,
"RefreshThreshold": 60,
"EnableClientAssertion": false,
"ClientAssertionAlgorithm": "RS256",
"CertificateConfig": {
...
}Configuration options for the certificate used to sign the client assertion. This section can be left out if client assertion is disabled.
"AmtOIDC": {
...
"CertificateConfig": {
"AllowInvalid": true,
"Subject": "amt-application-cert",
"StoreName": "MY",
"StoreLocation": "LocalMachine",
"Path": "certificate.pfx",
"Password": ""
}
}Sets the logging levels for the various ASP.NET Core components of the web application. These settings do not need be adjusted in a normal situation. The allowed log levels are, from most to least detailed: Trace, Debug, Information, Warning, Error, Critical and None.
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information",
"System.Net.Http": "Warning"
}
},In the AllowedHosts section, access to the web application can be restricted to specific hostnames. The value is a semicolon-delimited list of host names without port numbers. By default all hostnames are allowed by the asterisk (*) wildcard. Disallowed users will get a HTTP 400 error code (Bad Request).
"AllowedHosts": "*"