Source name specified in EventLogSource is registered to a log other than that specified in EventLogName
The EventLog
is attempting to refer to a source that is registered to a different log. If you are writing entries to an event log, you must specify the Source property. The Source property registers your component with the event log as a valid source of entries. A single source can be associated with (and therefore write entries to) only one event log at a time.
By default, if you try to write an entry without first having registered your component as a valid source, the system automatically registers the source with the event log, using the value of the Source property as the source string.
To correct this error
- Make sure the source is registered to the correct log. To do this, use the CreateEventSource method or one of its overloads to specify a string that uniquely identifies your component to the event log.
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for