CSLA Silverlight Deserialization Problems

CSLA Silverlight Deserialization Problems

Old forum URL: forums.lhotka.net/forums/t/7530.aspx


Danilo.Mendez posted on Friday, August 28, 2009

Hello
I am working in a new application using CSLA & Silverlight, and I have the next issue, all the application work fine under the VS 2008 environment, but if try to deploy the .xap file to the test environment I have a lot of the problems with some classes, and received the next error message 'The Type HMISLive.Server.PINSearchCriteria,HMISLive.Server.............. was unable to be deserialized, double check that the assembly containing this class has the same name on the Client and Server and that it is referenced by your server application'

The next is the code for the class

//using sections

namespace HMISLive.Server
{
[Serializable()]
public class PINSearchCriteria : CriteriaBase
{
public PINSearchCriteria()
{
}
public int PINNumber
{
get;
set;
}

protected override void OnGetState(Csla.Serialization.Mobile.SerializationInfo info, StateMode mode)
{
info.AddValue("PINNumber", PINNumber);
base.OnGetState(info, mode);
}

protected override void OnSetState(Csla.Serialization.Mobile.SerializationInfo info, StateMode mode)
{
PINNumber = info.GetValue("PINNumber");
base.OnSetState(info, mode);
}

}
}


and look like to other class created, used as parameters in methods like
public static void GetClientInfoList(PINSearchCriteria criteria, EventHandler> handler)
that work fine.
I made several test inclusive I used reflector to review the xap and the class is contained in the assembly. also I deployed in diferents servers inclusive compiled in diferents machines and I have the same error.

Some clue?

Thanks
Danilo Mendez
Kontac Corp.

Danilo.Mendez replied on Friday, August 28, 2009

Why the obvious isn't obvious...I forgot deploy the Web Server to the last version.....

Fiuuu

Copyright (c) Marimer LLC