Jeff Sanders Technical Blog

I am a Microsoft employee that has worked on all aspects of the Web Stack for a long time. I hope these blogs are useful to you! Use this information at your own risk.


<< Go Back

Wwsapi Samples In Windows 7 Sdk For Rc Unable To Add Url To Http Url Group

- 09 Jun 2009

I like to build and run with UAC on.  When running the HttpCalculatorService example I got this error: 

 Failure: errorCode=0x80070005
Unable to add URL to HTTP URL group.
Access is denied.

Running from an administrator command prompt I do not get the error!

Obviously I do not have permissions to something.  Some investigation revealed that I need to add the user I wanted to run as to the urlacl (http://msdn.microsoft.com/en-us/library/cc307223(vs.85).aspx)

So this is the command that allowd me to run (replace myDOMAIN\myUSERNAME with the domain and user you wish to run the Service under): netsh http add urlacl url=http://+:80/example user=myDOMAIN\myUSERNAME.

To do this in code you could use this API: http://msdn.microsoft.com/en-us/library/aa364503(VS.85).aspx but the code your are running would need to have the necessary permissions so you are in kind of a chicken and the egg situation!

Drop me a comment and let me know if this helped you please! <p mce_keep="true"> </p>

<< Go Back