Visual Studio 2017 – How to fix: Unable to start debugging on the web server.

When I first started Visual Studio 2017 after a clean installation I got the error:

Unable to start debugging on the web server. IIS does not list a web site that matches the launched URL.

When debugging a new asp.net project.

Turns out I was not running Visual Studio 2017 as Administrator.

To fix this see:

https://olivierpaes.wordpress.com/2016/06/26/unable-to-start-debugging-on-the-web-server-iis-does-not-list-a-web-site-that-matches-the-launched-url/

or

http://stackoverflow.com/questions/10716956/iis-does-not-list-a-website-that-matches-the-launch-url