0

We are trying to implement a custom logger for Elmah to log errors in a RavenDB database in an MVC5 application.

The Logging works perfectly but when we try to read the logs we get an exception for all properties of the Error Class that are of type NameValueCollection with the following error :

Cannot populate list type System.Collections.Specialized.NameValueCollection. Path 'Error.ServerVariables'.

Any assistance would be greatly appreciated

user2981411
  • 859
  • 12
  • 34
  • Any code you can share that is actually not working would be greatly appreciated. It is not clear what you are asking. You seem to claim logging works so the custom logger is working but when something reads the logs you get an error. What is that something that is reading the logs? – Eli Algranti Mar 31 '16 at 00:27
  • We are basically subclassing the Elmah ErrorLog class. We are overriding as per docs the Log, GetError and GetErros methods. The GetErros method is called when we navigate to the Elmah url. When looking at the serialized object in RavenDB, it seems all properties that are NameVaueCollection of the Error Class are serilized as arrays. Could this be the problem? I tried to pasted the code here but it is too long – user2981411 Mar 31 '16 at 00:42

0 Answers0