On my local machine, I am trying to delete a web site as follows and fail in both approaches. Rebooting local machine does not help.

  1. Delete Web site via Computer Management Console in IIS.
  2. Delete web site folder under c:\inetpub\wwwroot\mysite

I get the following error dialog:

Cannot delete mysite: Access is denied.

Make sure the disk is not full or write-protected and that the file is not currently in use.


Stop the IIS service, close any web browsers and try deleting. Else use Unlocker to unlock the files and delete it.

  • It might be nicer to IIS to delete the web site in IIS Manager first. – Andrew Morton Aug 8 '16 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.