Posts

Showing posts with the label EventViewer Error

An Error occured while creating EventSource, The Source and Log properties must be matched, or you may set Log to the empty string

If you get " The source 'xxx SourceName' is not registered in log 'xxx LogName'. (It is registered in log 'Application'.) " The Source and Log properties must be matched, or you may set Log to the empty string, and it will automatically be matched to the Source property. " while calling System.Diagnostics.EventLog.CreateEventSource with sourceName and LogName params,Just check registry whether SourceName is not registered in any other LogName(s). Verify LogName and SourceName in the Operationg Sytem is unique via REGEDIT; HKLM\System\CurrentControlSet\services\eventlog\ | ... if it is defined previously, you can not create . You must delete or change SourceName. regards, P.S:Please do not hesitate to share your comments.