Table of Contents

Appsettings.json

This article describes the configuration of the appsettings.json root file.

All settings can be found by opening the appsettings.json in the %OMETA_INSTALL_ROOT%\Ometa Software Suite folder.

Warning

Escape JSON file
The appsettings.json file adheres to the JSON structure format. Any special characters in file paths and connection strings must be escaped. The most common use case for escaping characters are backslashes between folder names.

For example: you would write C:\Program Files (x86)\Ometa BVBA but in the JSON format, the backslashes must be escaped: C:\\Program Files (x86)\\Ometa BVBA.

Full Example

 {
   "BamConfig": {
     "Enabled": true,
     "Destination": "File",
     "LogDirectory": "C:\\Program Files (x86)\\Ometa BVBA\\Log",
     "PortalUrl": "",
     "MaxPropertySize": 100,
     "MinimumLogLevel": "Information",
     "ProcessOverrides": [],
   },
   "LogProcessing": {
     "OperatingMode": "Fixed",
     "FileProcessing": {
       "Enabled": true,
       "IntervalTimeMinutes": 1
     },
     "Cleaning": {
       "Enabled": true,
       "CleaningTime": "23:30:00",
       "DaysToKeep": 15,
       "MaximumLogDataSizeGByte": 10.0
     }
   },

   "ConnectionStrings": {
     "OmetaFrameworkDatabase": "Data Source=sqlserver;Initial Catalog=OmetaDynamicCaseSystem;Trusted_connection=yes;TrustServerCertificate=True;",
     "OmetaBamDatabase": "Data Source=sqlserver;Initial Catalog=OmetaBAMLogging;Trusted_connection=yes;TrustServerCertificate=True;"
   },
  
   "AllowedHosts": "*",
   "AllowedOrigins": ["*"],
   "SigningCertificate": "CN=*.yourdomain.net",
 }  

Database Connection Strings

Check and update if needed the connection strings to the Ometa Framework and Ometa BAM databases:

  • OmetaFrameworkDatabase: must point to the Ometa Framework database.
  • OmetaBAMDatabase must point to the the Ometa BAM database.

SQL Server On Premise: Integrated Security

Setting the trusted_connection property to yes means that the user account will be taken:

  • IIS Application pool user for the Ometa Services
    • Ometa Generic REST Service
    • Ometa Authority Service
    • Ometa Core Service
  • Service account user for the Ometa Services
    • BCA
    • BCM
    • BCSL
    • BCJS
{
  // ...
  // Other JSON Settings
  // ...
  "ConnectionStrings": {
    "OmetaFrameworkDatabase": "Data Source=dbserver.ometa.net;database=OmetaFramework;trusted_connection=yes;TrustServerCertificate=True;",
    "OmetaBamDatabase": "Data Source=sqlserver.domain.net;database=OmetaBAMDatabase;trusted_connection=yes;TrustServerCertificate=True;"
  }
}

SQL Server On Premise: SQL Users

Note

Microsoft recommends using Integrated Security over SQL Logins. Refer to the following Microsoft article.

{
  // ...
  // Other JSON Settings
  // ...
  "ConnectionStrings": {
    "OmetaFrameworkDatabase": "Data Source=dbserver.ometa.net;database=OmetaFramework;trusted_connection=yes;Uid=myUsername;Pwd=myPassword;TrustServerCertificate=True;",
    "OmetaBamDatabase": "Data Source=sqlserver.domain.net;database=OmetaBAMDatabase;trusted_connection=yes;Uid=myUsername;Pwd=myPassword;TrustServerCertificate=True;"
  }
}

Azure SQL Database

When using Azure SQL Database services for data storage, adapt the connection strings a bit:

{
  // ...
  // Other JSON Settings
  // ...
  "ConnectionStrings": {
    "OmetaFrameworkDatabase": "Data Source='your-azure-instance-sql.database.windows.net';database=dcs database;Uid=myUsername;Pwd=myPassword;Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;",
    "OmetaBamDatabase": "Data Source='your-azure-instance-sql.database.windows.net';database=OmetaBAMDatabase;Uid=myUsername;Pwd=myPassword;Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;"
  }
}

Replace your-azure-instance-sql.database.windows.net, sqlaccount and sqlpwd with the proper corresponding values.

If for some reason no connection can be made to the Azure SQL Database, try adding the prefix 'tcp:' and port number ',1433' like this: tcp:your-azure-instance-sql.database.windows.net,1433.

Allowed Origins

Provide the allowed origins from which the IIS services may accept requests:

{
  // ...
  // Other JSON Settings
  // ...
  "AllowedOrigins": [ "https://example.sharepoint.com" ],
}
Note

You can pass multiple origins. You can also pass a wildcard for subdomains, for example: 'https://*.sharepoint.com'.