Search This Blog

05 July 2010

HTTP could not register URL http ....

Almost everytime you switch computer while in a project you encounters one or more problemes since you miss things that you haven't though of. I of course ran into such problems but the good thing about these problems is that they are farily easily solved.

I howevered also ran into a problem that was much harder to understand why it suddenly appared. When I was attempting to run my tests that uses locally created servicehosts any test that created such a service failed with some version of the error message below.

HTTP could not register URL http://+:8000/. Your process does not have access rights to
this namespace (see for details).

The reason for this is apparent but the solution isn't. Since I'm not running as the Administrator when debugging in Visual Studio, the service fails to start when I run it because if missing privileges. To make sure that you have the rights to setup these servicepath you need to add them using the command shell tool netsh.

One other solution for this problem is to run Visual Studio in administrator mode.

More information about how this can be done can be found in the excellent blog.