Troubleshooting: New Realm Creation Fails with a 500 Error Due to a Corrupted Template Web.Config

Follow
    Applies to:
  • SecureAuth Identity Platform
Deployment model:
  • Cloud
  • Hybrid
  • On Premises
  • Version Affected: 22.02 and later
     
     

    Overview

    When creating a new realm in SecureAuth Identity Platform's New Experience, the operation fails with an HTTP 500 error. The new realm appears in the Classic Experience, but does not show up under the Application Manager or Internal Application Manager in the New Experience. The realm's Post Authentication setting in the Classic Experience may also not match what was originally selected during creation.

     

    Cause

    The template realm's web.config file (SecureAuth1) — and possibly the Template folder's web.config as well — has become corrupted, which causes new realm creation in the New Experience to fail. Enabling Debug logging for the AdminApiLog file and attempting to create a realm again typically shows an entry similar to the following:

    2026/04/30 16:49:57.919|Error|SecureAuth.Admin.API.WebApiConfig|[Log] POST|https://localhost/api/v3/applications/|System.InvalidOperationException: Membership Provider LdapMembershipProvider does not exist in configuration.

     

    Resolution

    1. Enable Debug logging for the AdminApiLog file: create the folder D:\Secureauth\AdminApiLogs if it doesn't already exist, back up D:\Secureauth\Api\nlog.config, then replace its contents with the following:
      <?xml version="1.0" encoding="utf-8" ?>
      <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
            autoReload="true"
            throwExceptions="false"
            internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
        <targets>
          <target name="logfile" xsi:type="File" fileName="D:\SecureAuth\AdminApiLogs\AdminApiLog.txt"
                  layout="${date:universalTime=True}|${level}|${logger}|${message}|${exception:format=tostring}"/>
        </targets>
        <rules>
          <logger name="*" minlevel="Debug" writeTo="logfile" />
        </rules>
      </nlog>
      The resulting log file is D:\SecureAuth\AdminApiLogs\AdminApiLog.txt.
    2. Attempt to create the realm again in the New Experience, then check the AdminApiLog file for an entry matching the one shown in the Cause section above.
    3. Back up the existing SecureAuth1 and Template web.config files.
    4. Copy the known-good web.config files from D:\MFCApp_Bin\SISU\Download\Secureauth — both the SecureAuth1 and Template subfolders — over their respective paths under D:\Secureauth.
    5. Try creating the realm in the New Experience again.

     

    Special Considerations

    Once realm creation succeeds again, turn Debug logging back off by restoring the backup of D:\Secureauth\Api\nlog.config made in Resolution step 1.

    For any realms that failed to create during troubleshooting, manually remove their leftover paths from D:\Secureauth and from the corresponding IIS site as well.


     

    SecureAuth Knowledge Base Articles provide information based on specific use cases and may not apply to all appliances or configurations. Be advised that these instructions could cause harm to the environment if not followed correctly or if they do not apply to the current use case.

    Customers are responsible for their own due diligence prior to utilizing this information and agree that SecureAuth is not liable for any issues caused by misconfiguration directly or indirectly related to SecureAuth products.

    0 out of 0 found this helpful

    Comments

    0 comments

    Please sign in to leave a comment.