I have a service which i know is working except for writing to the application log the code is as follows:
Private Sub WriteToLog(ByVal strErrDescription As String, ByVal intErrNumber As Integer, _
Optional ByVal strSource As String = STR_CONST_APPLICATION_NAME, Optional ByVal EventType As EventLogEntryType = EventLogEntryType.Error)
Dim objEventLog As EventLog
objEventLog = New EventLog
objEventLog.Source = strSource
objEventLog.WriteEntry(strErrDescription & " " & intErrNumber, EventType)
objEventLog = Nothing
End Sub
but nothing gets written to the application log file, have i misseed somthing blattenly obvious (sp?) or have i got it completely wrong???
Help
Private Sub WriteToLog(ByVal strErrDescription As String, ByVal intErrNumber As Integer, _
Optional ByVal strSource As String = STR_CONST_APPLICATION_NAME, Optional ByVal EventType As EventLogEntryType = EventLogEntryType.Error)
Dim objEventLog As EventLog
objEventLog = New EventLog
objEventLog.Source = strSource
objEventLog.WriteEntry(strErrDescription & " " & intErrNumber, EventType)
objEventLog = Nothing
End Sub
but nothing gets written to the application log file, have i misseed somthing blattenly obvious (sp?) or have i got it completely wrong???
Help