Skip to main content

Serverkonfiguration

Installationsverzeichnis\appsettings.json

Beschreibung

Sektion Name Typ Beschreibung
Application ApplicationTitle String
Application HelpUrl String
Caching ExpirationTimeoutSeconds Boolean
Tasks UpdaterInterval Integer
Tasks MaxToastMessages Integer
Tasks ToastNotificationDuration Integer
ConnectionStrings DefaultConnection String
ConnectionStrings HangfireConnection String
DatabaseGenerator ConnectionString String
DatabaseGenerator DefaultSchemaName String
DatabaseGenerator MapptingTablePrefix String
DatabaseGenerator MapptingTablePostfix String
RestApi RequestBodyReplacementChar Char
Hangfire SchemaName String

Standardkonfiguration

{
  "Application": {
    "ApplicationTitle": "Data Connector",
    "HelpUrl": "https://docs.smcteam.de/books/data-connector"
  },
  "Caching": {
    "ExpirationTimeSeconds": 1800
  },
  "Tasks": {
    "UpdateInterval": 1,
    "MaxToastMessages": 3,
    "ToastNotificationDuration": 20
  },
  "ConnectionStrings": {
    "DefaultConnection": "Server=YOURSERVER;Database=DataConnector;Trusted_Connection=True;TrustServerCertificate=True;",
    "HangfireConnection": "Server=YOURSERVER;Database=DataConnector;Trusted_Connection=True;TrustServerCertificate=True;"
  },
  "DatabaseGenerator": {
    "ConnectionString": "Server=YOURSERVER;Database=DataConnector;Trusted_Connection=True;TrustServerCertificate=True;",
    "DefaultSchemaName": "dco",
    "MappingTablePrefix": "",
    "MappingTablePostfix": "Map"
  },
  "RestApi": {
    "RequestBodyReplacementChar": "$"
  },
  "Hangfire": {
    "SchemaName": "DcHangfire"
  },
  "AllowedHosts": "*",
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information",
      "Hangfire": "Information"
    }
  },
  "Azure": {
    "Enabled": false,
    "Instance": "https://login.microsoftonline.com/",
    "ClientId": "",
    "TenantId": "",
    "CallbackPath": "/signin-oidc"
  },
  "Serilog": {
    "MinimumLevel": {
      "Default": "Information",
      "Override": {
        "Microsoft": "Warning",
        "Microsoft.Hosting.Lifetime": "Information"
      }
    },
    "Using": [
      "Serilog.Expressions"
    ],
    "Enrich": [
      "WithEnvironmentUserName",
      "FromLogContext"
    ],
    "Properties": {
      "ApplicationName": "Data Connector"
    },
    "WriteTo": [
      {
        "Name": "Console",
        "Args": {
          "theme": "Serilog.Sinks.SystemConsole.Themes.AnsiConsoleTheme::Code, Serilog.Sinks.Console",
          "formatter": {
            "type": "Serilog.Templates.ExpressionTemplate, Serilog.Expressions",
            "template": "[{@t:HH:mm:ss} {@l:u3}] <s:{SourceContext}> {@m}\n{@x}"
          }
        }
      },
      {
        "Name": "Async",
        "Args": {
          "configure": [
            {
              "Name": "File",
              "Args": {
                "formatter": {
                  "type": "Serilog.Templates.ExpressionTemplate, Serilog.Expressions",
                  "template": "<![LOG[{EnvironmentUserName} --> {@l:u}: {@m}\n{@x}]LOG]!><time=\"{@t:HH:mm:ss.fffffff}\" date=\"{@t:MM-dd-yyyy}\" component=\"{ApplicationName} {Version}\" context=\"\" type=\"{#if @l = 'Error'}3{#else if @l = 'Warning'}2{#else}1{#end}\" thread=\"\" file=\"\">\n"

                },
                "path": "data_connector.log",
                "shared": "true",
                "fileSizeLimitBytes": "1000000",
                "rollOnFileSizeLimit": true,
                "flushToDiskInterval": "1"
              }
            }
          ]
        }
      }
    ]
  }
}