bigfoot3d
Well-known member
The problem I am having with Serialization is the Deserialization side I believe.
I get this SerializationException "Unable to find assembly 'HFHRemoteHelpClientApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'."
This is where the error occurs:
At the bottom of both the client and the server I have this serializable class.
Any ideas?
I get this SerializationException "Unable to find assembly 'HFHRemoteHelpClientApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'."
This is where the error occurs:
VB.NET:
[SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] getdata2()[/SIZE]
[SIZE=2][COLOR=#008000]'deserialize[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] bf [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] System.Runtime.Serialization.Formatters.Binary.BinaryFormatter[/SIZE]
[SIZE=2]mem2.Seek(0, IO.SeekOrigin.Begin)[/SIZE]
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] p [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] ClassPacket = [/SIZE][SIZE=2][COLOR=#0000ff]DirectCast[/COLOR][/SIZE][SIZE=2](bf.Deserialize(mem2), ClassPacket) [COLOR=red]<=== Error :([/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'save file/set text[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].SetLabel1Text(Encoding.ASCII.GetString(p.data))[/SIZE]
[SIZE=2][COLOR=#008000]'savefile(p)[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]'update UI (listbox)[/COLOR][/SIZE]
[SIZE=2]UIlistbox(p.filename)[/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE]
At the bottom of both the client and the server I have this serializable class.
VB.NET:
[SIZE=2]<Serializable()> [/SIZE][SIZE=2][COLOR=#0000ff]Public[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Class[/COLOR][/SIZE][SIZE=2] ClassPacket[/SIZE]
[SIZE=2][COLOR=#0000ff]Public[/COLOR][/SIZE][SIZE=2] filename [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]Public[/COLOR][/SIZE][SIZE=2] data() [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Byte[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Class[/COLOR][/SIZE]
Any ideas?