PowerApps Portal Force Restart

Sometimes you just need to restart your portal to get a setting to take effect. And sometimes the restart action in the portal administration just doesn’t seem like it is restarting your portal.

Why restart your portal? Some of the settings in your portal actually require a full cache flush, or restart of the behind the scenes ASP.NET application for them to take effect. These range from setting to setting, a lot of the authentication ones have this need though. Sometimes the cache message for whatever reason doesn’t make it there or you as a developer just want a fresh restart of your portal.

The standard action is to go the PowerApps Portal admin center, go to Portal Actions, and select restart. This should cycle the application by sending a restart command to the Azure App Service powering the portal behind the scenes. The restart is basically an IISRESET command. Your portal will then show a 503 error briefly, if you refresh a number of times quickly you might also see a 502 error and then be really really slow on the first request where the ASP.NET application is loaded into memory in the Azure App Service.

HTTP 503 error
HTTP 502 error

But sometimes this doesn’t work, or you never seem to get that cycle of the 503 error and then a slow page load. If that is the case another more evasive technique is to actually turn off the portal and then turn it back on. Effectively doing an IIS STOP and then IIS START.

You can actually do this from the PowerApps Portals admin center, Portal Details, scroll to the bottom and see the Change Portal State.

Now select the Off state, and select Update.

Navigate to your portal and wait to receive the App Stopped message screen.

Error 403 – Portal is stopped!

Once you see this screen, switch back to the Portal Details, select the On state and select Update.

This will also sometimes fix the restart mechanic as the update command on Portal Details actually will run a healing process as well to ensure that the necessary services like the cache invalidation are properly hooked up as well.

Stubborn portal that won’t restart just dealt with 🙂

Note the restart command and the change in state will take some time to actually change. They appear to be asynchronous commands sent to Azure App Services so they can take some time that the PowerApps Portal admin center UI will not always reflect.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s