Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9098841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:27:40+00:00 2026-06-17T00:27:40+00:00

I have a DTO as below – [Serializable()] Public Class DTO { Public Exception

  • 0

I have a DTO as below –

[Serializable()]
Public Class DTO
{
Public Exception ex {get;set;}
}

When i pass the object of type DTO from RIA service, on client side I do not see the property ex.
Please help me with this proble.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T00:27:43+00:00Added an answer on June 17, 2026 at 12:27 am

    As a sidenote, I do not think of Exceptions should be send directly between clients/ server. Instead I recommend catching them at an appropriate point and re-format the exception information into something more generic before sending it to the receiving side.

    As for your actual problem, you might have hit restrictions of the [Serializable] functionality. In MSDN article Serialization in Windows Communication Foundation it says (highlights by me):

    The default mapping for [Serializable] is different from the one used
    with XmlSerializer. Here, all fields are included in the mapping,
    whether public or private, and properties are never included.

    You might implement your own custom error class that supports serializing.

    See SO thread How to serialize an Exception object in C#? for an example.

    [EDIT]

    If that is too much effort, as a quick win, you could try to change the class definition into:

    [DataContract]
    public Class DTO
    {
        [DataMember]
        public Exception ex {get;set;}
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

lets have an DTO class: public class UserDto { public int Id { get;set;
I have a class (below): class InstrumentChange(object): '''This class acts as the DTO object
I have created an interface as shown below. The DTO object is a complex
I have DTO which contains itself (it is nested). public class MyDTO { private
I have two classes as below: [DataContract] public class Address { [DataMember] public string
I have a question about Parallel Object Hierarchies such as DTO. Theses hierarchies has
have written this little class, which generates a UUID every time an object of
I have a BL class named:A , DTO class named:DTO . Now assume I
Consider the code below (which has been simplified). I have a service class that
I have two entity classes: Person and Position . public class Person { public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.