Reputation: 573
In VS Community 2017 (v15.9.26) I am unable to debug as IIS Express Web Server Produces the following error.
Output for IIS Express: Failed to register URL "localhost:xxxxx/" for site. Error description: Cannot create a file when that file already exists. (0x800700b7)
Steps to try to resolve the issue
netsh http show urlacl
showed no other process using portI should note that I have three startup projects running. Two of the projects (with different ports) run fine so I can rule out firewall or SSL issues. The third startup application only produces this error.
After trying all 7 steps and resting my computer multiple times I am stuck. Any further solutions/fixes to try would be greatly appreciated!
Upvotes: 7
Views: 16271
Reputation: 392
I was repeatedly getting this even after changing ports, added new projects, restarted winnat, etc. But ultimately the thing worked for me is;
Upvotes: 3
Reputation: 336
To resolve that error, perform following steps
Get-Process -Id (Get-NetTCPConnection -LocalPort <portno>).OwningProcess
taskkill -f -t -im <processname>
where processname is same as retrieved by poweshell command. In my case it was devenv.exeNOTE: Same process may have other ports in use also. Above command will release all ports
Upvotes: 1
Reputation: 33
These steps solved this issue:
applicationhost.config
in the <project_folder>.vs\config\applicationhost.configUpvotes: 2
Reputation: 573
I found two temporary workarounds in order to bypass the VS error.
I am still looking for a more sustainable solution.
Upvotes: 4