Article ID: 2859188 - View products that this article applies to.
When using a custom application that logs Windows Events to the Event Log, you may notice that some of these events are not discovered by Operations Manager even though events are being monitored. If you open the Windows Event Viewer and select one of these events, and then click on Details and then XML View, you will notice an error such as the one below:
This event is not displayed correctly because the underlying XML is not well formed.
This issue occurs when the event XML is invalid. A situation like this may happen most commonly due to the fact that when the application creates the event, it will enter an Event Description with special characters that are not converted to HTML/XML entities.
To resolve this issue, update the custom application so that any special characters are written in proper HTML/XML format.
In newer versions of .NET such as .NET 4.0, the APIs used to create an Event in a Windows Event Log will automatically format the Event Strings (like Description) and convert any special characters to HTML/XML entries. An example of such a function that could be used is: EventLog::WriteEntry. See http://msdn.microsoft.com/en-us/library/xzwc042w(v=vs.100).aspx
(http://msdn.microsoft.com/en-us/library/xzwc042w(v=vs.100).aspx)for more information.
Earlier versions of .NET, depending on what API is being used, may not automatically format strings like the Event Description and convert the special characters into HTML/XML entries.
As an example, one of these special characters is the > sign which in XML should be written as >
(http://go.microsoft.com/fwlink/?LinkId=151500)for other considerations.
Article ID: 2859188 - Last Review: June 17, 2013 - Revision: 2.0
Contact us for more help