troubleshooting Question

Cannot serialize member System.Exception.Data

Avatar of jonorossi
jonorossi asked on
C#
7 Comments1 Solution6585 ViewsLast Modified:
Hello

I am writing a web service and am one of the objects I am trying to send is an exception object. Why can't I do this, do i have to pull out the properties and dump them into string or use tostring? I am using .NET 2.0. Here is the error that the web service emits:

--------------------------------------------
Cannot serialize member System.Exception.Data of type System.Collections.IDictionary, because it implements IDictionary.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NotSupportedException: Cannot serialize member System.Exception.Data of type System.Collections.IDictionary, because it implements IDictionary.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
...
--------------------------------------------
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros