Is it possible to recycle app pool for websites hosted in Azure Web app. Usually website hosted on a vm or as a web role we could create a powershell script which creates ps session and recycle the app pool. Is there a similar approach we can use for Azure Web app?
Using the Kudo console / editor you can edit the web.config file to include a comment such as the one below.
<-- Test -->
After saving this file the AppPool should recycle.
In testing this brings the application much faster than restarting the webapp through the Azure portal.
You can use Azure PowerShell to manage Azure web apps. In your case Restart-AzureRmWebApp
is the cmdlet you want to use.
The typical way to do this is to first sign in to Azure and then execute PowerShell commands:
Login-AzureRmAccount
# Only required if you need to select a specific subscription
Set-AzureRmContext -SubscriptionName "MySubscriptionName"
Restart-AzureRmWebApp -ResourceGroupName "Default-Web-WestUS" -Name "ContosoSite"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With