Windows7 IIS7: can't turn off read-only flag for InetPub\wwwroot. Can't edit website files!

By default only administrators have write access to C:\inetpub\wwwroot. Two options:

  1. Login with an administrator account, and elevate you editor.
  2. Set IIS to use a different directory for its root folder, on which your normal account has write/delete access.
  3. Change the permissions on C:\inetpub\wwwroot.

Right click on the editor and click "Run as Administrator". By default, you cannot edit files that is in the wwwroot directory. UAC prevents the files to be edited even though you are logged on to the machine as an Administrator.

Yes, alternately change the content directory from something other than c:\inetpub\wwwroot folder.