WCF Open Service Host Error

by David Kiff 17. February 2008 06:31

WCF "Your process does not have access rights to this namespace"

This is the error message I received when starting a WCF service in windows vista. The problem is down to Vista security restrictions (UAC) not allowing applications to open ports (start listening on a port).

There are a few ways to resolve this issue:

  1. Run the WCF host with administrative rights (not recommended) by right clicking your .exe and selecting “run as administrator”.
  2. Use netsh.exe to allow a user to start listening on the port(s) you specify:
    “netsh http add urlacl url=http://+:8080/ user=COMPUTERNAME\USERNAME”

This example allows the username specified to start listening on port 8080 with any IP address or hostname.

To find a list of commands run “netsh http”.

Domain Users: Replace “COMPUTERNAME” with the name of your domain.

Tags:

WCF