Note that there are some explanatory texts on larger screens.

plurals
  1. POError using WCF and DataContractSerializer
    primarykey
    data
    text
    <p>I have a fairly complex object model that I'm trying to serialize using WCF. I'm running into a problem where I can create a new instance on the server and return it to the client, then trying to pass that same object back or even serialize it using the DataContractSerializer throws an exception.</p> <p><strong>Test method Server.Service.Test.SerializationTest.TestFilingSerialization threw exception: System.Runtime.Serialization.SerializationException: There was an error deserializing the object of type MyNameSpace.MyObject. No set method for property '' in type ''</strong></p> <p>It's not giving me any info on a setter I'm supposedly missing, even though I've tried looking through the inheritance hierarchy for missing setters, I can't seem to get passed this. <strong>MyObject</strong> is a type of property on the object I'm trying to serialize, here's the funny part. In the setter for that property, I have code that looks like this:</p> <pre><code>set { _backingField = value; _backingField.IsDirtyManager.SetIsDirty(); NotifyPropertyChanged("MyProperty"); if (!ContainsType(_backingField.GetType())) { Aggregates.Add(_backingField); } } </code></pre> <p>If I comment out the Aggregates.Add it goes onto the next property and throws the same exception there, the kicker is, it get's through other properties with the same code, before it hits this one and dies, so I don't know what the problem could be.</p> <p>Anyone have experience where the real error is, because the Property name and Type are not filled out in the exception so it seems like the error has to be something else. If I just create a new instance on the client I can deserialize and serialize no problems, so there's gotta be something I'm missing here. Any ideas on what to look for?</p> <p><strong>EDIT</strong></p> <p>I am literally doing only this:</p> <ol> <li>Create instance</li> <li>Serialize</li> <li>De-serialize</li> <li>Re-serialize <ol> <li>Die here</li> </ol></li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload