Export (0) Print
Expand All
Expand Minimize

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.

Community Additions

ADD
Show:
© 2014 Microsoft