Azure Diagnostics generate exception in SystemEventsListener::LoadXmlString when reading event log which includes exception as event data

 When you write Windows Azure application, you may wish you include you own error or notifications in the event log. Or you would like to save exceptions in the event log which ultimately collected by Windows Azure Diagnostics in the Azure VM and sent to Windows Azure Storage.


When you  create an event log with Exception toString(), the event can’t be consumed by Azure Diagnostics instead you might see an exception in Azure Diagnostics module.

The exception shows a failure in SystemEventsListener::LoadXmlString while loading the event string.


If you dig deeper you will find that this exception is actually related with “xmlns” attribute present in your exception string as below:


<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<error xmlns="">


  <message xml:lang="en-US">The specified entity already exists.





This exception is caused by a known issue in Azure diagnostics component by the string “xmlns” being included in the content of an event log. 


To solve this problem you have two options:

  1. You can remove xmlns from the error data
  2. You also can replace double quote “ with single quote in the xmlns string


Comments (1)

  1. adawei says:

    interesting post ,thanks for your sharing

Skip to main content