I tried the solution proposed by Andrii to delete all <site>
inside the <sites>
node under the applicationhost.config file but after restarting VS2017 and launch my project, I got the following error:
Unable to connect to web server 'IIS Express'
In the config file, I had to put back the application pool like the following:
<site name="MyApp" id="1">
<application path="/" applicationPool="Clr4IntegratedAppPool"> <-- HERE
<virtualDirectory path="/" physicalPath="C:\Git\MyApp\MyApp" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:61508:localhost" />
</bindings>
</site>
<applicationDefaults applicationPool="Clr4IntegratedAppPool" /> <-- AND HERE
After that restart VS2017 and try again.
Also you might just look at the physicalPath folder specified in the config file... make sure it is writable. Some people specified they had the problem when the folder is encrypted. You can find some other possible solution here:
Creating a virtual directory failed with the error