Http Client Protocol Issues

If you use any of these solutions, Please let me know so I can track if any of this is useful to you! Thanks! This is an area to share observations I have made working with Http Client Protocols and the associated technologies. I currently work for the Microsoft team that supports the WinInet, WinHTTP and System.Net API's and classes associated with these technologies. This is not a replacement for Microsoft Support, but an area to discuss these technologies. These postings are provided "AS IS" with no warranties, and confer no rights. Use of included code samples are subject to the terms specified at Microsoft - Information on Terms of Use

WWSAPI samples in Windows 7 SDK for RC: "Unable to add URL to HTTP URL group."

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! 

 

Published Tuesday, June 09, 2009 9:15 AM by jpsanders
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required
Submit

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker