Settings

Settings are stored in the appsettings.json file in your [TotalviewDirectory]\TotalviewAuthentication

Example

Language

This is the default language to use if nothing else is specified by the user.
If this is not specified the default language will fallback to `AcceptLanguageHeaderRequestCultureProvider` which is set by the browser by default.

UseWindowsAuthentication

If set to true, the Totalview Authentication Portal will use Windows Authentication. To use this the Totalview Authentication Portal must run on a machine with access to the Active Directory.

AllowedHosts

Restricts hosts by the X-Forwarded-Host header to the values provided.
This must be none empty and must not contain a top-level wildcard `*`.
This is used by the Reverse Proxy if it is set

  • Values are compared using ordinal-ignore-case.
  • Port numbers must be excluded.
  • Subdomain wildcards are permitted but don’t match the root domain. For example, `*.contoso.com` matches the subdomain `foo.contoso.com` but not the root domain `contoso.com`.
  • Unicode host names are allowed but are converted to Punycode for matching.
  • IPv6 addresses must include bounding brackets and be in conventional form (for example, `[ABCD:EF01:2345:6789:ABCD:EF01:2345:6789]`). IPv6 addresses aren’t special-cased to check for logical equality between different formats, and no canonicalization is performed.
  • Failure to restrict the allowed hosts may allow an attacker to spoof links generated by the service.

Read more here

KnownProxies

Addresses of known proxies to accept forwarded headers from. Use `KnownProxies` to specify exact IP address matches.
The default is an `IList<IPAddress>` containing a single entry for `IPAddress.IPv6Loopback.`
This is used by the Reverse Proxy if it is set.

Read more here

Mail Options

Example

{
…,
“MailOptions”: {
“MailProvider”: “Exchange”,
“ExchangeOptions”: {
“SenderEmailAddress”: “no-reply@somedomain.com”,
“SenderPassword”: “Password1”,
“IsHttpsRequired”: true,
“ExchangeVersion”: 0
},
“SmtpOptions”: {
“SenderEmailAddress”: “no-reply@somedomain.com”,
“Host”: “mail.somedomain.com”,
“Port”: 25,
“UseSsl”: false,
“RequiresAuthentication”: false,
“UserName”: “”,
“Password”: “”
}
}
}

MailProvider

Can be Exchange or Smtp. This will determine what service and options will be used.

ExchangeOptions

SenderEmailAddress

The email address that will send the emails.
This will be used as the user name for the WebCredentials for the exchange service.
It will also be used for the auto discovery of the Exchange service.

SenderPassword

Password for the exchange account.

IsHttpsRequired

If this is set to true, the Service will only accept https endpoints from the auto discover.

ExchangeVersion

The number of the exchange version (i.e. for `Exchange2007_SP1` the ExchangeVersion would be `0`

  • Exchange2007_SP1 = 0
  • Exchange2010 = 1
  • Exchange2010_SP1 = 2
  • Exchange2010_SP2 = 3
  • Exchange2013 = 4
  • Exchange2013_SP1 = 5
  • Exchange2015 = 6
  • Exchange2016 = 7
  • V2015_10_05 = 8

SmptOptions

SenderEmailAddress

The address of the sender’s mailbox.

Host

The host to connect to.

Port

The port to connect to. If the specified port is 0, then the default port will be used.

UseSsl

true if the client should make an SSL-wrapped connection to the server.

RequiresAuthentication

true if the host requires authentication.

UserName

The user name (Only used if RequiresAuthentication is true).

Password

The password (Only used if RequiresAuthentication is true).

ConnectionStrings

DefaultConnection

The connection string to the Totalview Database.

Logging

Valid logging levels are:

  • Trace
  • Debug
  • Information
  • Warning
  • Error
  • Critical
  • None

LogLevel

  • Default: The recommended values is Information
  • Microsoft: The recommended values is Error
Last edited on September 30th, 2019