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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top