Mike Taulty's Blog
Bits and Bytes from Microsoft UK
Vista and WCF - Services and "Your process does not have access to this namespace"

Blogs

Mike Taulty's Blog

Elsewhere

Archives

Because of the way that Windows Vista works with User Account Protection even if you are running on Vista as an Administrator when you come to run a simple WCF service application that listens on, say;
 
http://localhost:8080/myNamespace/myService
 
You may well encounter the "Your process does not have access to this namespace" error which is basically saying that you're trying to register interest with HTTP.SYS but you don't have the permissions because this is an administrative function and even if you're an admin you're not going to get that to work on Vista.
 
There are two ways around it that I can think of.
 
One is to run "elevated" but that means you'll have to run VS 2005 elevated if you want to do debugging so that's perhaps not a good idea.
 
The second (proper) solution other was given to me when I wrote this post here on HTTPCFG.EXE.
 
Essentially, you need to run elevated for a moment whilst you use HTTPCFG.EXE to set the ACL on that portion of the namespace that you're trying to register (in my case http://+:8080/myNamespace) to allow your code to do those registrations. Once the ACL is set you can forget about running elevated.
 
Dominick has a great tool over here for helping you generate the right syntax for HTTPCFG.EXE - he even gives you the source code which is a very nice use of all the new ACL bits within .NET Fx 2.0.
 
I found that I couldn't get the proper installation of HTTPCFG.EXE to work on Vista because it thinks it's the wrong OS so I just copied the tool from an XP installation and that seemed to work fine for the Vista December CTP.
 

Posted Thu, Jan 5 2006 10:26 AM by mtaulty

Comments

Mike Taulty's Blog wrote Note to self on HTTP namespace reservations
on Fri, Nov 6 2009 2:10 AM

I used to have lots of hassle around reserving portions of the HTTP namespace so that ( e.g. ) WCF services