I kept getting an error similar to the error below and VS2015 refused to load the project. ————————— Microsoft Visual Studio ————————— Unable to create the virtual directory. This is especially useful if your site integrates with other sites like Facebook or Twitter using open auth protocols, as an example.
Well, the way this has been set up in previous versions of VS was that you edit your IIS Express config file at %USERPROFILE%\documents\IISExpress\config\application Host.config and update the properties of the site element that VS created for your project.
Let’s start by firing up a command prompt and whacking in this command: Phew!
That was a pretty long list of steps, but at least we have a better understanding of what happens under the IIS Express covers.
Keep an eye out though, the applicationhost.config is updated all the time by Visual Studio.
When you save it will ask you to create a virtual directory, click yes :) Important.
If you get “Unable to create the virtual directory.