[Mono-bugs] [Bug 560155] New: Crash using DataContractSerializer on Objects with read only fields

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Dec 2 17:13:32 EST 2009



           Summary: Crash using DataContractSerializer on Objects with
                    read only fields
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: WCF
        AssignedTo: atsushi at ximian.com
        ReportedBy: ptrajkumar at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

Created an attachment (id=330622)
 --> (http://bugzilla.novell.com/attachment.cgi?id=330622)
console application reproducing the problem

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/532.3 (KHTML, like Gecko) Chrome/ Safari/532.3

 I am attaching a small sample illustrating my problem. I have a simple
Object that has few readonly
fields with DataMember.

Under mono I get the following exception ?

Unhandled Exception:
System.Runtime.Serialization.InvalidDataContractException: DataMember field
System.String name must not be read-only.

Reproducible: Always

Steps to Reproduce:
1. Compile attached program and run
Actual Results:  
Program aborts after throwing an exception

Expected Results:  
Both p1 and p2 are printed out correctly

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list