Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why won't my Windows Service that is hosting a WCF Service run under LocalService or NetworkService accounts

I have a simple Windows Service hosting a WCF Service. I want to run the Windows Service under the LocalService account (or even the NetworkService account). However when I try to start it under either of these accounts it starts then immediately stops. It starts and runs OK under the LocalSystem account. Any thoughts as to how to work out why it will not stay running under LocalService or NetworkService.

Thanks,

David

like image 735
daveywc Avatar asked Sep 10 '10 04:09

daveywc


1 Answers

Thanks to the suggestions to check the event log from marc_s and ho1 I found out that I needed to add a namespace reservation as follows:

netsh http add urlacl url=http://+:1239/BOBPersistenceServer/ user="Local Service"

See http://msdn.microsoft.com/en-us/library/ms733768.aspx and http://msdn.microsoft.com/en-au/magazine/cc163531.aspx for more details.

like image 166
daveywc Avatar answered Sep 17 '22 23:09

daveywc