Brad Dean

WCF Error: Could Not Register URL

When hosting WCF services from Visual Studio you may, as I recently did, come across this error:

HTTP could not register URL http://localhost:12345/Service1.svc Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details.

The easy fix is to run Visual Studio as an administrator. The problem is you’ll just get this again if you don’t have the option to run your application as an administrator.

There is a great StackOverflow post on how to manually register the WCF service outside of Visual Studio (or the app you are building) in Windows 7.

This worked great for me until I went to deploy to a Windows 2003 Citrix server. In Windows 7 you use netsh to register the WCF service. Windows 2003 does not have netsh, instead using HttpCfg.exe. HttpCfg.exe is a pain to figure out. Don’t bother. Just use PaulWh’s HttpNamespaceManager tool. It worked great for me on Windows 2003, my WCF service was up in running in no time!

PaulWh’s HttpNamespace Manager Tool