Method or Operation Not Implemented" when calling Newtonsoft.Json.JsonConvert.DeserializeObject

Aug 5, 2013 at 1:16 AM
Hello,

I'm getting this error when I run the following C# code within the code of my form:
        using (var memorystream = new MemoryStream())
        {
            var bf = new BinaryFormatter();
            bf.Serialize(memorystream, (Newtonsoft.Json.JsonConvert.DeserializeObject(context.Data.ToString(), Type.GetType(TypeName), jsonSerializerSettings)));
            memorystream.Position = 0;
TypeName resolves to the full type of the .NET serializable class. I've verified that. ontext.Data.ToString() resolves to the correct JSON snippet.

What I really don't understand is that if I run this exact same code within an external assembly and pass in the exact same parameters, it works without issue.

is there a known problem with the DeserializeObject function? Is there anyway to resolve this?