Monday, June 01, 2009

Troubles accessing WCF service on Vista

Got this problem seconf time so need to describe it for future.
(Strange that there are so few comments on it found by Google.
Do any other developers use Vista? Or they know some secret way?
One of useful advises I met was "Get rid of Vista")

So, back to the problem.
I tried to debug by WCF service-based application on Vista
after succesfully running it on Windows XP.
However, it did not work.
First idea was to restart VisualStudio with Administrator permissions that is usual.
But it did not work again and gave smth. "is in Faulted state" error.

Magic words are the command:
netsh http add urlacl url=http://+:9001/ user=DOMAIN\user
Replace URL and user domain/name with your data.

More details are here:
http://stackoverflow.com/questions/598643/hosting-a-wcf-service-in-vista
and here
http://msdn.microsoft.com/en-us/library/ms733768.aspx

By the way, thanks a lot for all the guys from http://stackoverflow.com/. Great job!

(Sidenote. Why is it so complex to request permissions elevation from .NET? I got samples from Microsoft here but it is very unconmmon anyway)

No comments:

Post a Comment