[iis] "Cannot verify access to path (C:\inetpub\wwwroot)", when adding a virtual directory

I solved the problem by installing the development related features of IIS.

By default, IIS doesn't install all the required features.

You should install the IIS development related features to fix the problem.

enter image description here