'Handling URL Binding Failures in IIS Express

I have deployed my WCF webservice locally and its working fine, But in a method I got unexpected result so I decided to debug my webservice in Visual Studio. But I get the following errors. (Even I am running VS with administrative privileges). I also exposed endpoints in web.config but still not working here is the error from Log file,

Failed to register URL "http://localhost:61241/" for site "TaxiRiderService" application "/". Error description: Access is denied. (0x80070005)

enter image description here



Solution 1:[1]

I faced same problem windows7, VS15, I tried adding/removing localhost:port# to urlacl using netsh command but din`t work.

netsh http add urlacl url=http://localhost:63746/ user=everyone

I had to disable Internet Connection Sharing ICS for my ethernet (I had enabled this for sharing internet to VM) and I was able to debug/run solution locally. enter image description here

Solution 2:[2]

Open .CSPROJ from project, Delete the whole lines for
<DevelopmentServerPort> and <IISUrl> ...

http://gizmoblogr.com/821/workaround-url-binding-failure-error-iisexpress

Solution 3:[3]

Are you sure, that your're debugging the service with an elevated account? This error is quite common if you're trying to host a service on a non-default port using a standard user.

You could try to register that port to that specific user. Open an elevated command prompt and execute the follwing command:

add urlacl url=http://localhost:61241/TaxiRiderService user=YOURDOMAIN\youruser

For details have a look at: http://msdn.microsoft.com/en-us/library/windows/desktop/cc307223%28v=vs.85%29.aspx

Solution 4:[4]

on cmd with admin access

netsh http add urlacl url=http://localhost:80/ user=everyone

From Microsoft Docs: Handling URL Binding Failures in IIS Express

Solution 5:[5]

The problem came for me after messing with Hyper V Virtual Switch manager. I had the lan card driver uninstalled and reinstalled again. Problem solved at once.

Solution 6:[6]

Running visual studio as an administrator solves this issue for me. Sometimes .vs folder also needs to be deleted.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ManiVI
Solution 2 vinayak hegde
Solution 3 Jan Köhler
Solution 4 adiga
Solution 5 Antony Rigakis
Solution 6 Khalil