Thursday, June 10, 2010 11:30 AM
Mikael Sand
EventLog.WriteEntry message cannot exceed 32 766 characters
This is just a personal reminder of the kind of error messages you get when you try to use the log for what it was never intended for. In this case I tried to dump validation errors from an XML validation.
So a “best practice” would be to dump information to the event log like this:
EventLog.WriteEntry("Heading", ex.Message.Substring(0, Int32.MaxValue));