Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / October 2006

Tip: Looking for answers? Try searching our database.

BinaryFormatter.Deserialize and Smart Clients

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lambuz - 29 Sep 2006 14:37 GMT
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.CPRSWebClient"
/>

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.SerializationException:
Cannot find the assembly CprsBaseType, Version=1.0.2460.30737,
Culture=neutral, PublicKeyToken=d046a4512344d447. Server stack trace:
at
System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()

at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo
assemblyInfo, String name)
at
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)
at
System.Runtime.Serialization.Formatters.Binary.ObjectMap.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.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped
record)
at
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum
binaryHeaderEnum)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler
handler, __BinaryParser serParser, Boolean fCheck, IMethodCallMessage
methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream
serializationStream, HeaderHandler handler, Boolean fCheck,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryResponseMessage(Stream
inputStream, IMethodCallMessage reqMsg, Boolean bStrictBinding)
at
System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage
msg) Exception rethrown at [0]:
at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
at IBM.Cipros.Refinery.DataProvider.GetLastValue(RefineryArchive 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 ?
Lambuz - 02 Oct 2006 10:31 GMT
no idea from nobody ?

please help me
Phill W. - 04 Oct 2006 13:48 GMT
> 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.SerializationException:
> 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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.