Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
Tasks
How to: Add Your Application as a Source of Event Log Entries
How to: Remove an Event Source