Sunday, July 6, 2008

WCF + Vista: Configuring namespace reservations

WCF + Vista: Configuring namespace reservations
I have just started to look into Windows Communication Foundation (WCF). When I tried to host my first service I got a nice error message from Visual Studio telling me to “configure namespace reservations” and giving me this link http://msdn.microsoft.com/en-us/library/ms733768.aspx.
After reading a little while I finally figured out how to do it in Vista:
Microsofts example:netsh http add urlacl url=http://+:80/MyUri user=DOMAIN\user
Using this example it sould be something like:netsh http add urlacl url=http://+:80/MyFirstService user=MyComputer\MyUsername
However, this didn’t work on the first try. Remember to run the Console in Administrator mode, or else you will get an error message like: “Url reservation add failed, Error: 5The requested operation requires elevation.”

No comments: