Forum Discussion
slhicham
Jul 31, 2024Copper Contributor
Delete WebApp
Hi, I'm having trouble deleting an App Service that has VNet Integration enabled. The problem arises because the VNet has been removed, and the deletion process can't find the Subnet linked to the A...
slhicham
Aug 12, 2024Copper Contributor
Thank you for your help.
I tried all the commands without success to delete my web app. I can't contact Microsoft Support because my subscription does not allow me to create a support ticket. Is there any way to request Microsoft to delete my resources?
I tried all the commands without success to delete my web app. I can't contact Microsoft Support because my subscription does not allow me to create a support ticket. Is there any way to request Microsoft to delete my resources?
abhijeetdasgupta
Aug 13, 2024Copper Contributor
Hi slhicham,
I am afraid i am not aware of any other way to request Microsoft to delete the resources other than having the necessary support subscription.
Although can you try the below to see if they help:
1. Try Azure Resource Explorer:
- Navigate to https://resources.azure.com/ and find your App Service. You can attempt to manually remove or edit properties that are causing issues (like VNet integration) and then delete the resource.
- To delete, navigate to the resource's JSON view and look for the "Delete" button.
2. Try to Delete via PowerShell:
- You might try using PowerShell commands as an alternative to Azure CLI:
Remove-AzWebApp -ResourceGroupName <ResourceGroupName> -Name <AppServiceName> -Force - This command may bypass some of the issues encountered with the Azure CLI.
3. Try Azure Portal Automation Script:
- In the Azure Portal, go to your App Service and look for the "Automation Script" option. This provides a JSON template that describes your resource.
- You can attempt to download the script, modify it (removing problematic dependencies like VNet integration), and then reapply the script to update or delete the resource.
4. Try Azure REST API:
- You can directly use the Azure REST API to delete the App Service. This might work where other methods fail:
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{appName}?api-version=2021-02-01 - Replace {subscriptionId}, {resourceGroupName}, and {appName} with your actual values.
5. Try to Recreate the VNet and Subnet:
- Another potential workaround is to recreate the missing VNet and Subnet with the same names and configurations. Once recreated, you can attempt to remove the VNet integration from the App Service and then delete it.
Do give these a try and see if they work for you