Monodroid and Remote DataPortal Configuration

Monodroid and Remote DataPortal Configuration

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


louisf posted on Tuesday, January 08, 2013

I ready Rocky's last post regarding MonoDroid.  I tried configuring the DataPortal for Remote use in code on but with no luck. So, I thought I would through this question out there. Has anyone had any success configuring the DataPortal for remote use in Monodroid?

louisf replied on Wednesday, January 09, 2013

I got the call to the remote DataPortal working. Now, it seems that the error is occurring someone in the framework on Deserialization. Can anybody help with this? this is the Soap message being set back to the client. I am working with Csla Version 4.3.13.0/

 

 

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><FetchResponse xmlns="http://ws.lhotka.net/WcfDataPortal"><FetchResult xmlns:a="http://schemas.datacontract.org/2004/07/Csla.Server.Hosts.Silverlight" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><a:ErrorData><a:ExceptionTypeName>System.InvalidOperationException</a:ExceptionTypeName><a:InnerError><a:ExceptionTypeName>System.Collections.Generic.KeyNotFoundException</a:ExceptionTypeName><a:InnerError i:nil="true"/><a:Message>The given key was not present in the dictionary.</a:Message><a:Source>mscorlib</a:Source><a:StackTrace>   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)&#xD;

   at Csla.Serialization.Mobile.SerializationInfo.GetValue[T](String name)</a:StackTrace><a:TargetSiteName>get_Item</a:TargetSiteName></a:InnerError><a:Message>SerializationInfo.GetValue: CslaPrincipal.Identity</a:Message><a:Source>Csla</a:Source><a:StackTrace>   at Csla.Serialization.Mobile.SerializationInfo.GetValue[T](String name)&#xD;

   at Csla.Security.CslaPrincipal.OnSetState(SerializationInfo info, StateMode mode)&#xD;

   at Csla.Core.MobileObject.Csla.Serialization.Mobile.IMobileObject.SetState(SerializationInfo info)&#xD;

   at Csla.Serialization.Mobile.MobileFormatter.DeserializeAsDTO(List`1 deserialized)&#xD;

   at Csla.Serialization.Mobile.MobileFormatter.Deserialize(Stream serializationStream)&#xD;

   at Csla.Serialization.Mobile.MobileFormatter.Deserialize(Byte[] data)&#xD;

   at Csla.Server.Hosts.Silverlight.WcfPortal.Fetch(CriteriaRequest request)</a:StackTrace><a:TargetSiteName>GetValue</a:TargetSiteName></a:ErrorData><a:GlobalContext i:nil="true"/><a:ObjectData i:nil="true"/></FetchResult></FetchResponse></s:Body></s:Envelope>

 

Jet replied on Thursday, January 17, 2013

Same issue here. I wonder if this is a serialization issue. Has anyone successfully built an app using CSLA and MonoDroid with client and remote dataportals? It seems to fail during deserialization.

skagen00 replied on Thursday, January 17, 2013

It'd be interesting to see if the new serialization engine is the problem.  I haven't done anything with Monodroid but 4.2 I believe introduced the support for Monotouch/droid and 4.3 is what brought in the new serialization engine. 

It might be worth just trying your scenario with CSLA 4.2?

RockfordLhotka replied on Monday, January 21, 2013

Using a remote data portal is unfortunately unsupported. Originally monodroid didn't have a supported WCF implementation. I think they do now, but Kevin (my monodroid dev) is buried in his day job and has no time to work on CSLA for the moment.

Copyright (c) Marimer LLC