I want to log exception into database using enterprise library. To do that i need to convert System.Exception to string. I can recursively traverse the inner exception and create string. but that will not capture other properties of the exception. For example if the exception is of type FaultException<T>, then "Detail property will not get captured.
if i try to serialize Exception then it fails while serializing Data property because it is of type IDictionary
Exception.ToString() method also doesn't capture inner exceptions with stack trace, and other propertes ( im not sure about this, can someone confirm?)
So how convert Exception into String?