netsh http add urlacl etc. - why is this needed?

Apr 30, 2010 at 6:17 AM

When I run statlight (1.0-beta1) as a non-admin user, I get the following output:

************* Error *************
Cannot run StatLight. The current account does not have the correct privilages.

HTTP could not register URL http://+:8887/. Your process does not have access ri
ghts to this namespace (see for det

Try: (the following two steps that should allow StatLight to start a web server
on the requested port)
     1. Run cmd.exe as Administrator.
     2. Enter the following command in the command prompt.
          netsh http add urlacl url=http://+:8887/ user=DOMAIN\user

So far I haven't encountered this problem with other webservers that bind to non-privileged ports.

tcpview actually shows that process "System" is listening on

I am curious - why process "System"? And wouldn't it be sufficient in most cases to bind to

A solution that would allow statlight to be run by any user without having to set any special permissions would be great.


Apr 30, 2010 at 2:29 PM
Edited Apr 30, 2010 at 3:49 PM

StatLight is currently leveraging the built in System.ServiceModel.Web.WebServiceHost.

You can see the usage in this file.

To tell you the truth, once I got this working, I figured most devs had some sort of admin rights and this wouldn't be too much of an issue (and at the time I had other problems to solve with StatLight).

However, I would love to take ideas on better solutions. If there is a way I can tell the WebServiceHost how to become a web server without requiring admin rights, that would be great, or any other lightweight options out there.

Hope this helps.

May 4, 2010 at 8:26 AM

I don't think you can prevent this if you use WebServiceHost.

I have found some useful background info here:

There are some C# webserver samples around (e.g., but I don't know if they can be used for statlight.

Oct 10, 2010 at 9:32 PM

I know this is late... but I just pushed changes up to github that remove the need to run as administrator (from what I can tell)...

If you have an opportunity. Let me know if you can build and run/test it out... Hope this helps.

Nov 20, 2010 at 9:48 PM

Release v1.3 includes these changes.