System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security - cSharp Coder

Latest

cSharp Coder

Sharp Future

Friday, July 1, 2022

System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security

 I got the same exception when trying to install a service from the command line when using installutil in Windows 7. The solution was to open the command line as Administrator and then run installutil.

Also you may find it easier to use a framework like TopShelf to host your services, because it manages all the setup configuration from the name and description of the service to how your recovery process will work. It also allows to easily start your service from inside the IDE when you are debugging it.



No comments:

Post a Comment