Enabling SAML for ASP.NET Trace

The SAML component may be configured to enable SAML trace to be written to a log file. This information can assist with tracking down issues.

It is not recommended that SAML trace is left enabled in production systems as this may have an impact on performance.

Configure SAML Trace

Update your application’s web.config to include a <system.diagnostics> section as shown in the configuration below.

Log files are written to the logs sub-folder under your application’s root folder.

    <trace autoflush="true">
         <add name="CyclicTextWriter"/>
      <source name="ComponentSpace.SAML2" switchValue="Verbose">
          <add name="CyclicTextWriter"/>
      <!-- Ensure IIS has create/write file permissions for the log folder. -->

The switchValue should be set to “Verbose” in production systems for problem determination only. Otherwise, it should be set to either “Off” or “Information”.