Reputation: 9387
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?
Upvotes: 5
Views: 8594
Reputation: 161
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.
Upvotes: 6
Reputation: 106836
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"
Upvotes: 3