Data property in System.Exception (2.0)

  • Thread starter Thread starter Raghu
  • Start date Start date
R

Raghu

The Data property in System.Exception in .NET 2.0 allows you to add
serializable objects to it. However when the exception crosses app domian
boundaries, the contents (of Data property) are not serialized. The Data
property of the exception in the received app domain is empty and does not
have any contents in it. I tested with adding simple built in types also.
They are not serialized either.

Is this true or am I mistaken?

Thanks.
Raghu/..
 
I was checking the wrong exception. When you use reflection to invoke the
code in another app domain, it throws TargetInvokationException. I needed to
check its inner exception. The inner exception has the serialized items in
Data property.

My bad...
 
Back
Top