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
- Access to the SQL Console through a SuperUser account.
Solution
- First, you must log in to the SuperUser account
- Then, go to Settings > SQL Console
- Run the following query and make note of the PortalID: SELECT * FROM PortalAlias
- 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 = # - 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.
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.