If you are getting the following error after trying to debug a website project:
Unable to launch the IIS Express Web server.
Failed to register URL "http://localhost:62940/" for site "SITE NAME" application "/". Error description: Access is denied. (0x80070005).
and if windows managed to reserve the specific port (such as 62940) you might want to change the port of your projects IISExpress server.
(You can check what ports are being used by running netstat
. You can also try killing Microsoft.VisualStudio.Web.Host.exe*32
.
Alas, if none of that works locate your project.sln
(where project is the name of your specific project) and you can edit the port.
I did a string replace of all mentions of 62940 and replaced it with 65534. So my server names became localhost_65534
, but I
suspect it might have simply worked by changing VWDPort
, but it made it more consistant to change everything and it worked, so I left it alone.
I ultimately went one with a "dynamic port [in the] range of 49152 through 65535", to avoid further collisions.
Stack Overflow and Google are my heros and my references are:
Unable to launch the IIS Express Web server, Failed to register URL, Access is denied
Changing project port number in Visual Studio 2013
The default dynamic port range for TCP/IP has changed in Windows Vista and in Windows Server 2008