[WCF] HTTP could not register URL (wcf url) .Your process does not have access rights to this namespace

While hosting BasicHttpBinding WCF service in windows service , I came across the following error.

HTTP could not register URL (wcf url) .Your process does not have access rights to this namespace

The error occurs due to the service account does not have access rights to the namespace.

This is a HTTP WCF Service delegated error, (in other words, this won’t occur if you are hosting Named-Pipe WCF serivces)

To grant the service account access right, in Windows 2008

  1. Open command prompt with administrator account
  2. Execute the following command

netsh http add urlacl url=WCFURL user=DOMAIN\username

You should get a message saying “URL reservation successfully added

Advertisements

W3SVC on 'localhost' not available!

I once hit this issue where I couldnt see my wcf service and got this exception:

“(Microsoft.BizTalk.Adapter.Wcf.Publishing.WebDirectory.WebDirectoryException) World Wide Web service (W3SVC) on host “localhost” not available.

The following Windows component may not be installed: Application Server -> Internet Information Services (IIS) -> Common Files.

Unknown error (0x80005000)”

 

The fix was simple. Here is what I did:

At IIS 7 enable “IIS 6.0 Compatibility”:

Steps:
1. Open Control Panel
2. Double-click Programs and Features
3. Expand Internet Information Services
4. Expand Web Management Tools
6. Check IIS 6 Management Compatibility

 

 

Configuring IIS 7 for WCF service

I was publising my schemas as wcf services when I hit this issue:

"The Messaging Engine failed to register the adapter for “WCF-BasicHttp” for the receive location.."

The fix was simple:

1) Create a new application pool and set the identity to the service account used by the isolated host instance. 

2) Give the service account used by the isolated host instance read/write access to the C:\Windows\Temp\ directory.

3) Enable the receive location.

Thats it!