Search code examples
c#wcfwindows-7

WCF ServiceHost access rights


I get the following error when going through the WCF tutorial.

HTTP could not register URL http://+:8000/ServiceModelSamples/Service/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details).

Is this something caused by a restriction on Windows 7?


Solution

  • The issue is that the URL is being blocked from being created by Windows.

    Steps to fix: Run command prompt as an administrator. Add the URL to the ACL

    netsh http add urlacl url=http://+:8000/ServiceModelSamples/Service user=mylocaluser