Creating a virtual directory failed with the error
More often than not, at least in my case, this happens is when a *.csproj.user
file is in the project directory and has <UseIISExpress>true</UseIISExpress>
in it.
Alternatively, as mentioned by Zachary Cutler you can also simply: close Visual Studio, delete the
*.csproj.user
file and reopen Visual Studio. This will force VS to rebuild the file.
I've already found the solution. I just had to edit C:\Users\Administrator\Documents\IISExpress\config\applicationhost.config
file, by adding my site to <sites>
node.