Skip to main content
Skip table of contents

appsettings.json Overview

The file appsettings.json is the main source of configuration for the DpeNanoServices application. It contains various (optional) sections. Some are inherited from the used ASP.Net framework, some are custom options for DpeNanoServices.

Example appsettings.json file

A starting underscore for an option name or section “comments” it out.

No need to copy and paste this text, Nano has a default appsettings.json in its folder

CODE
{
  // configure ASP.Net logging in this section, modify only for debugging use cases
  // also see https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning",
      // optional low-level HTTP logging middleware, remove leading underscore to activate 
      "_Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware": "Information"
    },

    "EventLog": {
      "LogLevel": {
        "Default": "Information",
        "Microsoft.AspNetCore": "Warning",
        "_Microsoft.Hosting.Lifetime": "Information"
      }
    },

    "Dpe": {
      "LogLevel": {
        "Default": "Information",
        "Microsoft.AspNetCore": "Warning",
        "_Microsoft.Hosting.Lifetime": "Information",
        "System.Net.Http.HttpClient.Default.ClientHandler": "Warning",
        "System.Net.Http.HttpClient.Default.LogicalHandler": "Warning"
      }
    }
  },

  // optionally filter allowed hosts, e.g. "example.com;localhost", normally no need to modify this
  // also see https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/host-filtering
  "AllowedHosts": "*",

  // configure Kestrel web server endpoints
  // also see https://learn.davidsystems.com/nano/1.4/specifying-certificates-for-https
  "_Kestrel": {
    "Endpoints": {
      "Https": {
        "Url": "https://localhost:5256",
        "SslProtocols": [ "Tls12", "Tls13" ],
        "Certificate": {
          "Path": "C:\\\\Orga\\\\LicsAndKeys\\wildcard_davidsystems-test_com.pfx",
          "Password": ""
        }
      }
    }
  },

  // configures the physical location where DPE logs are stored, e.g. file or DpeCoreDb database
  "DpeLogging": {
    // normally set to false => log to DpeCoreDb database; true may make sense in isolated deplyoments e.g. when running Nano locally on a notebook
    "UseFileLogger": true,

    // required when logging to DpeCoreDb database
    "_ConnectionString": "Data Source=VM-DPEDEMO22\\sql2019;Initial Catalog=DpeCoreDb;user=sa;password=;Min Pool Size=100;Max Pool Size=1000;TrustServerCertificate=true;",

    // optional override for log files location
    "_BaseFolder": ".\\",

    // optional override for log config file location
    "_ProtocolParameterXml": "C:\\temp"
  },

  "DpeParFile": {
    // optional override for path to XML file that specifies PAR file locations
    "_DigaSystemRegistryXmlFilePath": null
  },

  "DpeLicenses": {
    // allows to use feature files from an arbitrary location (instead of Features folder inside Nano folder)
    "_FeaturesFolder": "C:\\Temp\\MyExternalLicenseStore"
  },

  "DpeWorkflowService": {
    // required when using Workflow System
    "_ConnectionString": "Data Source=VM-DPEDEMO22\\SQL2019;Initial Catalog=DpeCoreDb;user=sa;password=;Min Pool Size=100;Max Pool Size=1000;TrustServerCertificate=true;"
  },

  "DpeContentService": {
    "_OnTheFlyAudioConversionEnabled": true,
    "_OnTheFlyAudioConversionLocalEnabled": false,
    "_OnTheFlyAudioConversionFormat": "[FILETYPE]RAW[FORMAT]MPEG-LAYER3[SAMPLERATE]48000[BITRATE]128[MODE]Stereo[RELAXED_ERROR_CHECK]1",
    "_OnTheFlyAudioConversionExtension": ".mp3",
    "_MediaPartialBlockSize": -1,
    "_MaxLocalAudioConversions": 4,
    "_OnTheFlyWaveformEnabled": true,
    "_OnTheFlyWaveformLocalEnabled": false,
    "_MaxLocalWaveformConversions": 4,
    "_ExtToType": "Audio=WAV,MP3|Video=|Text=TXT",
    "_ExtToClass": "",
    "_VerboseAshxLog": false,
    "_TestExtensionsEnabled":  false
  },
  
  // configure when running under Linux; do not use when running on Windows
  "_Ldap": {
    "Address": "",
    "Port": 389,
    "Security": "none" // none, ssl
  },

  // configure a shared folder where all components in a distributed system have access to (NanoServices, DPE Processors, WorkflowServer) 
  // not needed on deployments where everything is on one machine
  "_TempFolder": "\\\\MyShare\\Temp",

  // Enable Kerberos/NTLM handshake on token2 endpoint
  "EnableNegotiate": false,

  // optional, only enable for debugging
  "SkipXDpeHash": false,
  "SkipDynamicResponseCompression": false  
}

Section Logging

Configures ASP.Net logging. Which kind of information should be logged to which logging channels.

More info under https://learn.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-7.0

Section Kestrel

Configures Kestrel, the web server framework used by ASP.Net.

See also

More info under https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/endpoints?view=aspnetcore-7.0

Section DpeLogging

Configures DPE Logging

  • UseFileLogger:
    true: logging to files,
    false: logging to DpeCoreDb database (requires a valid ConnectionString)

  • ConnectionString: optional database connection string for accessing DpeCoreDb (needed when UseFileLogger=false)

  • ProtocolParameterXml: optional override for path to log config file (Protocol.parameterxml). default location is application folder

  • BaseFolder: folder for file logging

Section DpeParFile

Configures DPE Parameter File Usage

See also How and Where DigaSystem parameter files are searched

Section DpeWorkflowService

Configures DPE Workflow Service

  • ConnectionString: optional database connection string for accessing DpeCoreDb (needed when workflows are used, e.g. for copying entries from ContentManager or for creating lores audio, waveform files or for creating speech-to-text files)

Section DpeContentService

Configures DPE Content Service

  • OnTheFlyAudioConversionEnabled: enables on-the-fly audio conversion

  • OnTheFlyAudioConversionLocalEnabled: switches to on-the-fly audio conversion via Audio32Console.exe instead of using workflow system. Useful when operating in non-enterprise environments, e.g. a local notebook installation.
    Note: the Audio32Console package must be copied to a sub folder tools

  • OnTheFlyAudioConversionCacheLowWaterMarkGb: cache cleanup options, default=10

  • OnTheFlyAudioConversionCacheHighWaterMarkGb: cache cleanup options, default=20

  • OnTheFlyWaveformEnabled: enables on-the-fly waveform creation

  • OnTheFlyWaveformLocalEnabled: switches to on-the-fly waveform creation via Audio32Console.exe instead of using workflow system. Useful when operating in non-enterprise environments, e.g. a local notebook installation.
    Note: the Audio32Console package must be copied to a sub folder tools

  • OnTheFlyWaveformCacheLowWaterMarkGb: cache cleanup options, default=10

  • OnTheFlyWaveformCacheHighWaterMarkGb: cache cleanup options, default=20

Section DpeRightsService

  • DpeTokenCreateMode: e.g. Secure (=default behavior) or Std

  • DpeTokenAcceptMode: e.g. Disabled, Any, Secure. Default behavior = accept secure and unsecure tokens

Example:

CODE
  "DpeRightsService": {
    "DpeTokenCreateMode": null, // e.g. Secure (=default behavior) or Std
    "DpeTokenAcceptMode": null  // e.g. Disabled, Any, Secure. Default behavior = accept Secure and Unsecure tokens
  },

Section Ldap

Configures LDAP (only needed when not running under windows)

  • Address: address of the LDAP server

  • Port: port of the LDAP server, e.g. 389 or 636

  • Security: e.g. “none” or “ssl”

Section Otlp

Optionally configures an OpenTelemetry Protocol (OTLP) endpoint

  • Endpoint: "e.g. "<http://vm-cae-test.davidsystems-test.com:4317>",

Section RouteByHostNameFileProvider

  • Optionally used to map host names to web apps in sub-folders of wwwroot

  • Not needed for web apps that support being hosted in subfolders, e.g. CM, Admin, CAE or ROAD web frontends

Example:

CODE
  // optionally used to map host names to web apps in sub-folders of wwwroot
  // not needed anymore for CM, Admin, CAE or ROAD web frontends
  "RouteByHostNameFileProvider": {
    "Enabled": false,
    "AutoMapFromDotLocalhost": false,
    "Mappings": [
      {
        "Host": "road-admin.localhost",
        "SubFolder": "road-admin"
      },
      {
        "Host": "road-scheduling.localhost",
        "SubFolder": "road-scheduling"
      },
      {
        "Host": "instarecorder.localhost",
        "SubFolder": "instarecorder"
      }
    ]
  },

Top Level Options

  • TempFolder: optionally specifies a shared temp folder, otherwise a local default folder is used

  • SkipXDpeHash: optionally disable security hash; only enable for debugging, default:false

  • SkipDynamicResponseCompression: false, optionally disable dynamic response compression; only enable for debugging, default: false

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.