0

I am maintaining a silverlight application that uses Hessian.

What I have noticed that when we are returning lots of data the deserialization code raises an error in the method:

ReadMap(AbstractHessianInput abstractHessianInput, Object result)

with the expection:

ArgumentException occurred: 

Object of type 'TO.ConflictTO' cannot be converted to type 'TO.IdTO'.

I initially thought it was due to the size of the data returned because when we reduced the data the error did not appear.

The object structure being deserialized is in the format:

public class Report
{
    public Conflict[] Conflicts {get;set;}
}

public class Conflict
{
    public PlayerDetails Player { get; set; }
    public PlayListDetails[] ConflictingPlaylists{ get; set;}
}

public class PlayerDetails 
{
    public int Id { get; set; }
    public string Name { get; set; }
    public bool Enabled { get; set; }
    public string HostName { get; set; }
    public string Password { get; set; }
    public int Port { get; set; }
    public string UserName { get; set; }
}

public class PlayListDetails
{
    public int Id { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }
    public PlayListType Kind { get; set; }
    public string PublishFileName { get; set; }
    public bool Looped { get; set; }
    public string AutoRestrictions { get; set; }
    public PlayListPlayMethod PlayMethod { get; set; }
}

I am not sure where the error is coming from?

JD.
  • 15,171
  • 21
  • 86
  • 159
  • I'm venturing a wild guess: A discrepancy between the serialization and deserialization code? – TaW Jun 07 '14 at 10:31
  • I noticed that if we reduced the data (i.e. instead of returning 100 Conflict objects, I returned 20 say), the error never occurs. I would the error to occur if there was a discrepancy. – JD. Jun 08 '14 at 00:16
  • Can you test to see if it really is in the number of objects or maybe in the objects themselves; maybe there is a weirdness in the data of one of the objects..? – TaW Jun 08 '14 at 07:56
  • Hi, there is nothing in the data. Definitely seems to be the size. Do you know of any limit? – JD. Jun 09 '14 at 16:12

0 Answers0