Turn on authentication logging

IMPORTANT: You must turn on logging, only if you need to investigate a problem. This feature generates substantial amounts of data and you should turn it off, when you do not use it.

Turn on authentication logging

To this, perform the following:

  1. Navigate to Administration » Settings » Advanced » Authentication » SecurityTokenService » IdentityServer.
  2. In the left pane, click Authentication.
  3. Select Enable logging checkbox.
  4. Save your changes.

In case you are unable to access your website backend (for example due to authentication problems), you can manually enable authentication logging for troubleshootign purposes. To do that, you'll need to edit your Sitefinity CMS configuration files, so please proceed with the followign steps with caution:

  1. Edit the ~/App_Data/Sitefinity/Configuration/AuthenticationConfig.config file
  2. Set enableLogging="True" in the identityServerSettings tag:

 

The log information is available in the Authentication.log file, located in your project’s ~\App_Data\Sitefinity\Logs folder.

Change the default logger

To change the default logger, perform the following:

  1. Override the current SitefinityStsLogProvider or implement custom IdentityServer3.Core.Logging.ILogProvider
  2. Register the provider in the ObjectFactory, in the following way:
    ObjectFactory.Container.RegisterInstance<IdentityServer3.Core.Logging.ILogProvider>(new MyLogger());

Was this article helpful?