Type object
File match appsettings.json appsettings.*.json
Schema URL https://catalog.lintel.tools/schemas/schemastore/appsettings-json/latest.json
Source https://www.schemastore.org/appsettings.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Properties

Kestrel object

ASP.NET Core Kestrel server configuration.

3 nested properties
Endpoints Record<string, object>

Endpoints that Kestrel listens to for network requests. Each endpoint has a name specified by its JSON property name.

EndpointDefaults object

Default configuration applied to all endpoints. Named endpoint specific configuration overrides defaults.

3 nested properties
Protocols string

The protocols enabled on the endpoint.

Values: "None" "Http1" "Http2" "Http1AndHttp2" "Http3" "Http1AndHttp2AndHttp3"
SslProtocols string[]

Specifies allowable SSL protocols. Defaults to 'None' which allows the operating system to choose the best protocol to use, and to block protocols that are not secure. Unless your app has a specific reason not to, you should use this default. Available in .NET 5 and later.

ClientCertificateMode string

Specifies the client certificate requirements for a HTTPS connection. Defaults to 'NoCertificate'. Available in .NET 5 and later.

Default: "NoCertificate"
Values: "NoCertificate" "AllowCertificate" "RequireCertificate"
Certificates Record<string, object>

Certificates that Kestrel uses with HTTPS endpoints. Each certificate has a name specified by its JSON property name. The 'Default' certificate is used by HTTPS endpoints that haven't specified a certificate.

Logging Record<string, object>

Configuration for Microsoft.Extensions.Logging.

7 nested properties
LogLevel Record<string, string>

Log level configurations used when creating logs. Only logs that exceeds its matching log level will be enabled. Each log level configuration has a category specified by its JSON property name. For more information about configuring log levels, see https://docs.microsoft.com/aspnet/core/fundamentals/logging/#configure-logging.

Console
4 nested properties
LogLevel Record<string, string>

Log level configurations used when creating logs. Only logs that exceeds its matching log level will be enabled. Each log level configuration has a category specified by its JSON property name. For more information about configuring log levels, see https://docs.microsoft.com/aspnet/core/fundamentals/logging/#configure-logging.

FormatterName string

Name of the log message formatter to use. Defaults to 'simple'.

Default: "simple"
FormatterOptions object

Log message formatter options. Additional properties are available on the options depending on the configured formatter. The formatter is specified by FormatterName.

3 nested properties
IncludeScopes boolean

Include scopes when true. Defaults to false.

Default: false
TimestampFormat string

Format string used to format timestamp in logging messages. Defaults to null.

UseUtcTimestamp boolean

Indication whether or not UTC timezone should be used to for timestamps in logging messages. Defaults to false.

Default: false
LogToStandardErrorThreshold string

Log level threshold.

Values: "Trace" "Debug" "Information" "Warning" "Error" "Critical" "None"
EventSource
1 nested properties
LogLevel Record<string, string>

Log level configurations used when creating logs. Only logs that exceeds its matching log level will be enabled. Each log level configuration has a category specified by its JSON property name. For more information about configuring log levels, see https://docs.microsoft.com/aspnet/core/fundamentals/logging/#configure-logging.

Debug
1 nested properties
LogLevel Record<string, string>

Log level configurations used when creating logs. Only logs that exceeds its matching log level will be enabled. Each log level configuration has a category specified by its JSON property name. For more information about configuring log levels, see https://docs.microsoft.com/aspnet/core/fundamentals/logging/#configure-logging.

EventLog
1 nested properties
LogLevel Record<string, string>

Log level configurations used when creating logs. Only logs that exceeds its matching log level will be enabled. Each log level configuration has a category specified by its JSON property name. For more information about configuring log levels, see https://docs.microsoft.com/aspnet/core/fundamentals/logging/#configure-logging.

ElmahIo
1 nested properties
LogLevel Record<string, string>

Log level configurations used when creating logs. Only logs that exceeds its matching log level will be enabled. Each log level configuration has a category specified by its JSON property name. For more information about configuring log levels, see https://docs.microsoft.com/aspnet/core/fundamentals/logging/#configure-logging.

ElmahIoBreadcrumbs
1 nested properties
LogLevel Record<string, string>

Log level configurations used when creating logs. Only logs that exceeds its matching log level will be enabled. Each log level configuration has a category specified by its JSON property name. For more information about configuring log levels, see https://docs.microsoft.com/aspnet/core/fundamentals/logging/#configure-logging.

AllowedHosts string

ASP.NET Core host filtering middleware configuration. Allowed hosts is a semicolon-delimited list of host names without port numbers. Requests without a matching host name will be refused. Host names may be prefixed with a '.' wildcard, or use '' to allow all hosts.

ConnectionStrings Record<string, string>

Connection string configuration. Get connection strings with the IConfiguration.GetConnectionString(string) extension method.

Definitions

webOptimizer object

Settings for WebOptimizer.Core

enableCaching boolean

Determines if the "cache-control" HTTP headers should be set and if conditional GET (304) requests should be supported. This could be helpful to disable while in development mode.

enableTagHelperBundling boolean

Determines if <script> and <link> elements should point to the bundled path or a reference per source file should be created. This is helpful to disable when in development mode.

Default: true
cdn object

Definitions for WebEssentials.AspNetCore.CdnTagHelpers

url string

An absolute URL used as a prefix for static resources

pattern=^((//|https?://).+|)$
prefetch boolean

If true, injects a tag that speeds up DNS resolution to the CDN.

Default: true
pwa
cacheId string

The cache identifier of the service worker (can be any string). Change this property to force the service worker to reload in browsers.

Default: "v1.0"
offlineRoute string

The route to the page to show when offline.

Default: "/offline.html"
registerServiceWorker boolean

Determines if a script that registers the service worker should be injected into the bottom of the HTML page.

Default: true
registerWebmanifest boolean

Determines if a meta tag that points to the web manifest should be inserted at the end of the head element.

Default: true
routesToPreCache string

A comma separated list of routes to pre-cache when service worker installs in the browser.

Default: ""
strategy enum

Selects one of the predefined service worker types.

Default: "cacheFirstSafe"
Values: "cacheFirst" "cacheFirstSafe" "minimal" "networkFirst"
ElmahIo object
ApiKey string required

An elmah.io API key with the Messages | Write permission.

pattern=^([0-9a-f]{32})|(#\{.*\}#?)$
LogId string required

The Id of the elmah.io log to store messages in.

pattern=^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})|(#\{.*\}#?)$
Application string

An application name to put on all error messages.

HandledStatusCodesToLog integer[]

A list of HTTP status codes (besides 404) to log even though no exception is thrown.

TreatLoggingAsBreadcrumbs boolean

Include log messages from Microsoft.Extensions.Logging as breadcrumbs.

HeartbeatId string

The Id of the elmah.io heartbeat to notify.

pattern=^([0-9a-f]{32})|(#\{.*\}#?)$
protocols string

The protocols enabled on the endpoint.

certificate object

Certificate configuration.

Path string

The certificate file path. If a file path is specified then the certificate will be loaded from the file system.

KeyPath string

The certificate key file path. Available in .NET 5 and later.

Password string

The certificate password used to access the private key.

Subject string

The certificate subject. If a subject is specified then the certificate will be loaded from the certificate store.

Store string

The certificate store name. Defaults to 'My'.

Default: "My"
Location string

The certificate store location. Defaults to 'CurrentUser'.

Default: "CurrentUser"
Values: "LocalMachine" "CurrentUser"
AllowInvalid boolean

A value indicating whether or not to load certificates that are considered invalid. Defaults to false.

Default: false
sslProtocols string[]

Specifies allowable SSL protocols. Defaults to 'None' which allows the operating system to choose the best protocol to use, and to block protocols that are not secure. Unless your app has a specific reason not to, you should use this default. Available in .NET 5 and later.

clientCertificateMode string

Specifies the client certificate requirements for a HTTPS connection. Defaults to 'NoCertificate'. Available in .NET 5 and later.

kestrel object

ASP.NET Core Kestrel server configuration.

Endpoints Record<string, object>

Endpoints that Kestrel listens to for network requests. Each endpoint has a name specified by its JSON property name.

EndpointDefaults object

Default configuration applied to all endpoints. Named endpoint specific configuration overrides defaults.

3 nested properties
Protocols string

The protocols enabled on the endpoint.

Values: "None" "Http1" "Http2" "Http1AndHttp2" "Http3" "Http1AndHttp2AndHttp3"
SslProtocols string[]

Specifies allowable SSL protocols. Defaults to 'None' which allows the operating system to choose the best protocol to use, and to block protocols that are not secure. Unless your app has a specific reason not to, you should use this default. Available in .NET 5 and later.

ClientCertificateMode string

Specifies the client certificate requirements for a HTTPS connection. Defaults to 'NoCertificate'. Available in .NET 5 and later.

Default: "NoCertificate"
Values: "NoCertificate" "AllowCertificate" "RequireCertificate"
Certificates Record<string, object>

Certificates that Kestrel uses with HTTPS endpoints. Each certificate has a name specified by its JSON property name. The 'Default' certificate is used by HTTPS endpoints that haven't specified a certificate.

logLevelThreshold string

Log level threshold.

logLevel Record<string, string>

Log level configurations used when creating logs. Only logs that exceeds its matching log level will be enabled. Each log level configuration has a category specified by its JSON property name. For more information about configuring log levels, see https://docs.microsoft.com/aspnet/core/fundamentals/logging/#configure-logging.

logging Record<string, object>

Configuration for Microsoft.Extensions.Logging.

LogLevel Record<string, string>

Log level configurations used when creating logs. Only logs that exceeds its matching log level will be enabled. Each log level configuration has a category specified by its JSON property name. For more information about configuring log levels, see https://docs.microsoft.com/aspnet/core/fundamentals/logging/#configure-logging.

Console
4 nested properties
LogLevel Record<string, string>

Log level configurations used when creating logs. Only logs that exceeds its matching log level will be enabled. Each log level configuration has a category specified by its JSON property name. For more information about configuring log levels, see https://docs.microsoft.com/aspnet/core/fundamentals/logging/#configure-logging.

FormatterName string

Name of the log message formatter to use. Defaults to 'simple'.

Default: "simple"
FormatterOptions object

Log message formatter options. Additional properties are available on the options depending on the configured formatter. The formatter is specified by FormatterName.

3 nested properties
IncludeScopes boolean

Include scopes when true. Defaults to false.

Default: false
TimestampFormat string

Format string used to format timestamp in logging messages. Defaults to null.

UseUtcTimestamp boolean

Indication whether or not UTC timezone should be used to for timestamps in logging messages. Defaults to false.

Default: false
LogToStandardErrorThreshold string

Log level threshold.

Values: "Trace" "Debug" "Information" "Warning" "Error" "Critical" "None"
EventSource
1 nested properties
LogLevel Record<string, string>

Log level configurations used when creating logs. Only logs that exceeds its matching log level will be enabled. Each log level configuration has a category specified by its JSON property name. For more information about configuring log levels, see https://docs.microsoft.com/aspnet/core/fundamentals/logging/#configure-logging.

Debug
1 nested properties
LogLevel Record<string, string>

Log level configurations used when creating logs. Only logs that exceeds its matching log level will be enabled. Each log level configuration has a category specified by its JSON property name. For more information about configuring log levels, see https://docs.microsoft.com/aspnet/core/fundamentals/logging/#configure-logging.

EventLog
1 nested properties
LogLevel Record<string, string>

Log level configurations used when creating logs. Only logs that exceeds its matching log level will be enabled. Each log level configuration has a category specified by its JSON property name. For more information about configuring log levels, see https://docs.microsoft.com/aspnet/core/fundamentals/logging/#configure-logging.

ElmahIo
1 nested properties
LogLevel Record<string, string>

Log level configurations used when creating logs. Only logs that exceeds its matching log level will be enabled. Each log level configuration has a category specified by its JSON property name. For more information about configuring log levels, see https://docs.microsoft.com/aspnet/core/fundamentals/logging/#configure-logging.

ElmahIoBreadcrumbs
1 nested properties
LogLevel Record<string, string>

Log level configurations used when creating logs. Only logs that exceeds its matching log level will be enabled. Each log level configuration has a category specified by its JSON property name. For more information about configuring log levels, see https://docs.microsoft.com/aspnet/core/fundamentals/logging/#configure-logging.

allowedHosts string

ASP.NET Core host filtering middleware configuration. Allowed hosts is a semicolon-delimited list of host names without port numbers. Requests without a matching host name will be refused. Host names may be prefixed with a '.' wildcard, or use '' to allow all hosts.

connectionStrings Record<string, string>

Connection string configuration. Get connection strings with the IConfiguration.GetConnectionString(string) extension method.

NLog object

NLog configuration

autoReload boolean

Automatically reload the NLog configuration when notified that appsettings.json file has changed.

Default: false
throwConfigExceptions boolean | null

Throws an exception when there is a config error? If not set, then throwExceptions will be used for this setting.

Default: false
throwExceptions boolean

Throws an exception when there is an error. For unit testing only and advanced troubleshooting.

Default: false
internalLogLevel string

The minimal log level for the internal logger.

Default: "Off"
Values: "Trace" "Debug" "Info" "Warn" "Error" "Fatal" "Off"
internalLogFile string

Write internal log to the specified filepath

internalLogToConsole boolean

Write internal log to a console

Default: "false"
internalLogToConsoleError boolean

Write internal log to a console with error stream

Default: "false"
globalThreshold string

Log events below this threshold are not logged.

Default: "Off"
Values: "Trace" "Debug" "Info" "Warn" "Error" "Fatal" "Off"
autoShutdown boolean

Automatically call LogFactory.Shutdown on AppDomain.Unload or AppDomain.ProcessExit

Default: "true"
extensions object[]

Load NLog extension packages for additional targets and layouts

Default:
[]
variables object

Key-value pair of variables

targetDefaultWrapper object

Wrap all defined targets with this custom target wrapper.

Default:
{}
1 nested properties
type string required
targets object
Default:
{}
1 nested properties
async boolean

Wrap all defined targets using AsyncWrapper with OverflowAction=Discard for better performance.

rules NLogRulesItem[] | object
NLogRulesItem object

Redirect LogEvents from matching Logger objects to specified targets

logger string required

Match Logger objects based on their Logger-name. Can use wildcard characters ('*' or '?').

ruleName string

Rule identifier to allow rule lookup with Configuration.FindRuleByName and Configuration.RemoveRuleByName.

level string | string
levels string

Comma separated list of levels that this rule matches.

minLevel string | string
maxLevel string | string
finalMinLevel string | string
writeTo string

Name or names of a target - separated by comma. Remove this property for sending events to the blackhole.

final boolean

Ignore further rules if this one matches.

Default: false
enabled boolean
Default: true
filters object[] | object
filterDefaultAction string

Default action if none of the filters match.

Default: "Ignore"
Values: "Neutral" "Log" "Ignore" "LogFinal" "IgnoreFinal"
Serilog object

Serilog appSettings Configuration

$schema string

Pointer to the schema against which this document should be validated.

Using section contains list of assemblies in which configuration methods. Can be required depending of the project type: See: https://github.com/serilog/serilog-settings-configuration#using-section-and-auto-discovery-of-configuration-assemblies

uniqueItems=true
LevelSwitches object
FilterSwitches object
MinimumLevel string | object

Minimum LogLevel Threshold. (Support dynamic reload if the underlying IConfigurationProvider supports it)

One of: Log level string, Detailed Log level. object
Properties Record<string, string>

This section defines a static list of key-value pairs that will enrich log events.

Enrich

This section defines Enriches that will be applied to log events.

All of: MethodCallReference array | string | object
Destructure

This section defines Destructure.

All of: MethodCallReference array | string | object
Filter

This section defines filters that will be applied to log events.

All of: MethodCallReference array | string | object
WriteTo

This section configures the sinks that log events will be emitted to.

All of: MethodCallReference array | string | object
AuditTo

This section configures sinks for auditing, instead of regular (safe) logging. Obs: When auditing is used, exceptions from sinks and any intermediate filters propagate back to the caller.

All of: MethodCallReference array | string | object