Temporarily disable a DNN Portal

Overview

Users may want to temporarily hide or shut down a portal for maintenance work but there is no option in the DNN UI that can accomplish this. This article provides a guide to hiding the portal through the backend.

Prerequisites

Solution

  1. First, you must log in to the SuperUser account
  2. Then, go to Settings > SQL Console
  3. Run the following query and make note of the PortalID: SELECT * FROM PortalAlias
  4. Next, run the below query to update the Expiry Date for the Portal that needs to be disabled
    UPDATE Portals
    SET    ExpiryDate = 'MM.DD.YYYY'
    WHERE  PortalID = #
  5. If you would like to re-enable the portal again, you need to update the expiry date with any date in the future that was set above by:
    UPDATE Portals
    SET ExpiryDate = ''
    WHERE PortalID = #

Note: For SQL queries executed directly in the Database or on the SQL console, you need to Clear Cache for this to work: Settings > Servers > Clear Cache

 

Testing

To test that the query has run successfully and the Portal is disabled:

  • Access the Portal URL and you should get an expiration message. 

    2020-05-26_1048.png

You can change the expired message to a customized message by accessing the file path DNNRootFolder/App_GlobalResources/SharedResources.resx and modifying the ContractExpired.Error text.

Comments

0 comments

Please sign in to leave a comment.