Stacker
Stacker

Reputation: 8237

How to Start Windows Service in Administrator Mode

i bet its pretty easy question , any way im trying to run a windows service which host WCF service in administrator mode!

i keep getting the exception of :

HTTP could not register URL http://+:8000/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details)

i know its something has to do with the fact that windows doesnt start process services in admin mode but instead it start it in standard mode unless you specify the oppsite

any help on how to start it in admin mode ?

Upvotes: 0

Views: 3872

Answers (3)

spender
spender

Reputation: 120518

It would be inadvisable to run a service under admin mode simply to get an Url reservation on the Http pipeline. When you come to writing an installer, you can automate creation of the reservation in code. Here's a link that will help you: urlreservation.codeplex.com

Upvotes: 1

rkellerm
rkellerm

Reputation: 5522

Add a manifest to the hosted WCF service with this phrase:

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

Upvotes: 0

Stacker
Stacker

Reputation: 8237

i guess this

netsh http add urlacl url=http://+:80/MyUri user=DOMAIN\user

fixed it but now i have a new exception any way i will look for the new exception and iw ill feed back if its something else.

Upvotes: 1

Related Questions