Print Page | Close Window

IIdGenerator with Silverlight

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2682
Printed Date: 16-Apr-2026 at 3:51pm


Topic: IIdGenerator with Silverlight
Posted By: orcities
Subject: IIdGenerator with Silverlight
Date Posted: 17-May-2011 at 8:24am
I have tried to implement your demo of IIdGenerator and I get the following error:
 
The formatter threw an exception while trying to deserialize the message:
There was an error while trying to deserialize parameter http://ideablade.com/EntityModel:workState - http://ideablade.com/EntityModel:workState .
The InnerException message was 'Element 'http://ideablade.com/EntityModel:NextIdGenerator'
contains data from a type that maps to the name
'http://schemas.datacontract.org/2004/07/LOC.AMP.Data.DomainModel:NumericIdGenerator'.
The deserializer has no knowledge of any type that maps to this name. Consider using a
DataContractResolver or add the type corresponding to 'NumericIdGenerator' to the list
of known types - for example, by using the KnownTypeAttribute attribute or by adding it to the
list of known types passed to DataContractSerializer.'.  Please see InnerException for more details.

   at IdeaBlade.EntityModel.RemoteEntityServerProxyBase.CheckConnection(Exception pException)
   at IdeaBlade.EntityModel.EntityServerProxy.SaveChanges(SaveWorkState workState)
   at IdeaBlade.EntityModel.EntityManager.SaveEntitiesCore(SaveWorkState workState)
 
Any help would be great.



Replies:
Posted By: smi-mark
Date Posted: 17-May-2011 at 9:22am
Where is your Id Generator right now? In the SL model or the desktop model? It looks like it is missing in one.


Posted By: orcities
Date Posted: 17-May-2011 at 9:30am
I have 2 assemblies. One for my WPF build and one for my SL build. The SL build is linked to files in the WPF build. I added the generic IIdGenerator provided by Ideablade to the SL build. I have a seperate one in my WPF build but it uses dbconnectionstring which is not available in SL.


Posted By: orcities
Date Posted: 17-May-2011 at 10:15am
Sorry, I think I understand now. The server code is not the SL code. I am adding #if !SILVERLIGHT to the needed areas.



Print Page | Close Window