title: Azure: Cannot Delete Subnet of App Service VNet Integration Preview
body: <p>I was attempting to test the new VNet Integration for App Services so I connected my App Service to the subnet 'AppServicesSubnet'. It never worked, always was showing a loading message. So after a few days I then disconnected it, which it said failed but the status showed as 'not configured' regardless.</p>
  
  <p>However I am unable to delete the subnet 'AppServicesSubnet'. It says </p>
  
  <blockquote>
    <p>"Failed to delete subnet 'AppServicesSubnet'. Error: Subnet
    AppServicesSubnet is in use by
    AppGroup-DEV/providers/Microsoft.Web/serverfarms/AppServicePlan-DEV
    and cannot be deleted."</p>
  </blockquote>
  
  <p>So I then deleted the app service plan 'AppServicePlan-DEV' this took about 30 minutes and succeeded. However I can still not delete the subnet 'AppServicesSubnet' with the same error given above.</p>
  
  <p>I also cannot delete the virtual network 'Network-DEV' as a similar message is reported: </p>
  
  <blockquote>
    <p>"Failed to delete virtual network 'Network-DEV'. Error: Subnet
    AppServicesSubnet is in use by
    AppGroup-DEV/providers/Microsoft.Web/serverfarms/AppServicePlan-DEV
    and cannot be deleted."</p>
  </blockquote>
  
  <p>The app service plan 'AppServicePlan-DEV' doesn't even exist anymore so I'm not sure how to clean up this subnet.</p>
  
  <p>Any help on how to just get rid of this lingering subnet would be much appreciated.</p>
  
  <p>Background on the new App Service VNet Integration Preview can be found here:
  <a href="https://blogs.msdn.microsoft.com/appserviceteam/2018/10/17/new-app-service-vnet-integration-feature/" rel="nofollow noreferrer">https://blogs.msdn.microsoft.com/appserviceteam/2018/10/17/new-app-service-vnet-integration-feature/</a>
  and here:
  <a href="https://docs.microsoft.com/en-us/azure/app-service/web-sites-integrate-with-vnet#new-vnet-integration" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/app-service/web-sites-integrate-with-vnet#new-vnet-integration</a></p>