Reputation: 16
I'm looking for a solution to restart the azure app server/app service from C#
Is there a solution for this ?
Upvotes: 0
Views: 1176
Reputation: 18387
Not only in c# but almost in every language. Just call the REST API:
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart?api-version=2019-08-01
https://learn.microsoft.com/en-us/rest/api/appservice/webapps/restart
Upvotes: 2