473,473 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

BinaryFormatter.Deserialize and Smart Clients

Hi all,
I'm triying to create a prototype of a smart client that using .NET
Remoting.

I've got an assembly loaded into an HTML page by a tag object
<OBJECT id="myID" height="150" width="300"
classid="http:bin/CPRSWebClient.dll#IBM.Cipros.Refinery.CPRSWebClien t"
/>

My assembly is strong named and it is full trusted.

Thi assembly referenced some other assembly also strong named and full
trusted and publish in the same virtual directory of the first one.

The object is correctly loaded inside my HTML page and create correctly
a remote channel and I can instance a remote object.

I've got a problem when I try to invoke a method on this remote object.

I'm sure that the invocation occured correctly server side, but when
the return object arrived client side I've got this exception.

System.Runtime.Serialization.SerializationExceptio n:
Cannot find the assembly CprsBaseType, Version=1.0.2460.30737,
Culture=neutral, PublicKeyToken=d046a4512344d447. Server stack trace:
at
System.Runtime.Serialization.Formatters.Binary.Bin aryAssemblyInfo.GetAssembly()

at
System.Runtime.Serialization.Formatters.Binary.Obj ectReader.GetType(BinaryAssemblyInfo
assemblyInfo, String name)
at
System.Runtime.Serialization.Formatters.Binary.Obj ectMap..ctor(String
objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA,
Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader
objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo,
SizedArray assemIdToAssemblyTable)
at
System.Runtime.Serialization.Formatters.Binary.Obj ectMap.Create(String
name, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[]
typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader,
Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray
assemIdToAssemblyTable)
at
System.Runtime.Serialization.Formatters.Binary.__B inaryParser.ReadObjectWithMapTyped(BinaryObjectWit hMapTyped
record)
at
System.Runtime.Serialization.Formatters.Binary.__B inaryParser.ReadObjectWithMapTyped(BinaryHeaderEnu m
binaryHeaderEnum)
at System.Runtime.Serialization.Formatters.Binary.__B inaryParser.Run()
at
System.Runtime.Serialization.Formatters.Binary.Obj ectReader.Deserialize(HeaderHandler
handler, __BinaryParser serParser, Boolean fCheck, IMethodCallMessage
methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.Bin aryFormatter.Deserialize(Stream
serializationStream, HeaderHandler handler, Boolean fCheck,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Remoting.Channels.CoreChannel.Deser ializeBinaryResponseMessage(Stream
inputStream, IMethodCallMessage reqMsg, Boolean bStrictBinding)
at
System.Runtime.Remoting.Channels.BinaryClientForma tterSink.SyncProcessMessage(IMessage
msg) Exception rethrown at [0]:
at
System.Runtime.Remoting.Proxies.RealProxy.HandleRe turnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateI nvoke(MessageData&
msgData, Int32 type)
at IBM.Cipros.Refinery.DataProvider.GetLastValue(Refi neryArchive obj)
at IBM.Cipros.Refinery.CPRSWebClient.Check()

If I try to instance client side an object like that returned by the
invocation no exception occured.

Any ideas ?

Sep 29 '06 #1
2 1474
no idea from nobody ?

please help me

Oct 2 '06 #2
Lambuz wrote:
I'm sure that the invocation occured correctly server side, but when
the return object arrived client side I've got this exception.

System.Runtime.Serialization.SerializationExceptio n:
Cannot find the assembly CprsBaseType, Version=1.0.2460.30737,
Culture=neutral, PublicKeyToken=d046a4512344d447. Server stack trace:
That version - "Version=1.0.2460.30737" - has me worried.

Those last two numbers are [re-]generated every time you rebuild
(re-open?) the project. It's all /too/ easy to wind up with different
versions - and, to the Framework, totally different assemblies - on each
side of the Remoting Divide.

HTH,
Phill W.
Oct 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dominic | last post by:
Hi everybody, In my application, I'm planning to use BinaryFormatter to serialize a potentially huge object to file (and, of course, deserialize back to memory later). My question is if there is...
5
by: aladdinm1 | last post by:
Hi All, I have an annoying trouble with binary serialization. I have a windows forms application which works like a server and keeps sending data to its clients. The data is serialized before...
0
by: aladdinm1 | last post by:
Hi All, Reference to the problem I posted with subject "BinaryFormatter.Deserialize fails when used with .net ActiveX". I could successfully solve the problem by creating a class inherited from...
3
by: Joshua Moore | last post by:
I have a webservice that serializes a ton of variables and other good stuff to a txt file using SoapFormatter (IFormatter), and when I try to deserialize it using the binary formatter, i get the...
0
by: Fred Heida | last post by:
Hi Al, i have a funny problem.. i you can call it funny.. what i have is 2 assemblies, the first one does nothing other then Application.Run(new MyForm())
11
by: Igor | last post by:
Hi. While executing BinaryFormatter.Deserialize() I get: System.InvalidCastException: Specified cast is not valid. I implemented ISerializable interface. What may be a problem? Thanks.
0
by: Fruber Malcome | last post by:
I'm getting a very weird exception and hoping someone may be able to help. I have an Office Add-In that lives in a .dll (for email reference ai.dll) ai.dll makes calls into the core part of the...
19
by: Sharon | last post by:
Hi, When I'm doing BinaryFormatter.Deserialize() over a TCP socket. When I'm closing the TcpListener by invoking the TcpListener.Stop(); I get: System.IO.IOException with message "Unable to...
11
by: JZ | last post by:
Hi, I'm using a class and binary formatter to store data in files. For example.. Dim FPs As New StuctureDataFile() Dim FileStream As Stream = File.Open(pfile, FileMode.Open) Dim...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.