views:

415

answers:

2

I am using an example from iDesign about one way calls. I can get it to work on a Vista machine (VS2008) but not on a windows 7 machine (VS2010).

I get this error:

HTTP could not register URL http://+:8001/MyService/. Your process does not have access rights to this namespace

ServiceHost host = new ServiceHost(typeof(MyService));
host.Open();

I get the error on the host.Open(); line. I noticed that windows asks first for some firewall and to give permission which I did but still it is not working. What can I do?

+1  A: 

This has to do with how the security for vista and later versions of windows deal with port access. The Post below has the command you need to run.

Take a look at this post

rerun
A: 

Have you reserved that namespace? The link that is in the exception message tells you how, however as you appear to have missed or not gotten that

Open an elevated command prompt and run

netsh http add urlacl url=http://+:8001/MyService/ user=DOMAIN\user

replacing DOMAIN\user with your account details, or a suitable group

blowdart