Unlocking Site Security from the Database

In case you find yourself locked out of the Admin Portal Website due to a misconfiguration in the Admin Portal Site Security (/admin/settings?category=settings_user_administration_category_header), you can unlock the Admin Portal from the database doing the following steps

Before Admin Portal version 3.4.10 

  1. Execute the following query against the database

    USE AccessPortal
    UPDATE SETTINGS
    SET Value = '[]'
    WHERE Name like 'Userswith%' OR  Name like 'Roleswith%' OR Name like 'AccessPortalSiteSecurityPermissions'
  2. Reset the IIS by running the following command in the command line or PowerShell as administrator.

    iisreset
  3. The site will be unlocked and you will be able to reconfigure the LDAP configuration using the following article.


After Admin Portal version 3.4.10 

  1. Execute the following query against the database

    USE <database name>
    DECLARE @systemSettingsCategory INT = (SELECT [ID] FROM [SETTINGSCATEGORY] WHERE [CategoryName] = N'settings_system_category_header');
    DECLARE @userAdministrationSettingsCategory INT = (SELECT [ID] FROM [SETTINGSCATEGORY] WHERE [CategoryName] = N'settings_user_administration_category_header');
    UPDATE [SETTINGS] SET [Value] = N'[]'
    WHERE [Category] = @systemSettingsCategory AND [Name] = 'AccessPortalSiteSecurityPermissions'
    
    UPDATE [SETTINGS] SET [Value] = N'No'
    WHERE [Category] = @userAdministrationSettingsCategory AND [Name] = 'RequireSignInForAdmin'
  2. Reset IIS by running the following command in the command line or PowerShell as administrator.

    iisreset
  3. The site will be unlocked and you will be able to reconfigure the LDAP configuration