Windows Service will not create event messages
I have created a windows service and have it installed. When I try to start the service, I get a message box named JIT Debugging with a message stating that access is denied. Then another message box stating the service could not be started.
My service is create with this code to create the event log.
Public Sub New()
' This call is required by the Component Designer.
' Add any initialization after the InitializeComponent() call
If Not EventLog.SourceExists("AdminReportSource") Then
eLog.Source = "AdminReportSource"
eLog.Log = "ReportLog"
Then in the OnStart sub, I try to write out a message.
Protected Overrides Sub OnStart(ByVal args() As String)
If I comment out WriteEntry, the services starts. Why am I unable to create event messages?