Hello,
I'am writing a server/client application in vb.net.
Now, what i would like to do is build a server application that fills a database with dataobjects recieved from a client and keeps other clients up to date with the changes that are made in the database.
I can send strings from client to server and back, but i can't find a way to send an object from client to server.
By example
I have an object called Person with a few properties.
I would like to send a list of new person objects from the client to the server so that the server can store them into the database.
Anyone have an idea??
thanks
Loading
test testPosted Aug 3, 2008, 7:12 AM
test testPosted Aug 1, 2008, 5:50 AM
When I serialize the object at server side, we can't deserialize it at client side or in the other direction. What does work is serializing and deserializing on the same side (server and client), but not between server and client.
It gives the following error:
A first chance exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll
System.Runtime.Serialization.SerializationException: Kan assembly Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null niet vinden.
bij System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
bij System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
bij System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
bij System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
bij System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum)
bij System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
bij System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
bij System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
bij System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
bij Client.Form1.Deserialize(String s) in D:\Aquamella\Client\Client\Form1.vb:regel 107
A first chance exception of type 'System.NullReferenceException' occurred in Client.exe
Scott LyslePosted Jul 31, 2008, 4:50 PM