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?