Sunday, 13 October 2013

Windows service on Local Computer started and then stopped error

A Windows service hosting a WCF service starts and stops immediately without writing to the Windows Application Event Log.

Possible cause:
The WCF service exposes an HTTP endpoint which is not authorized in the HTTP access control list (ACL). With some debugging and tracing, the error causing the service to shut down may actually be:

“HTTP could not register URL http://+:8080/MyService/. ...”

Register the HTTP address in the HTTP ACL by executing the following command in administrator mode:

C:\Windows\system32>netsh http add urlacl url=http://+:8080/MyService/ user=\Everyone

No comments: