Re: remoting serialization exception




"Brendan Grant" <grantb@xxxxxxxxxxxxxxx> wrote in message
news:99E76AD6-AE09-4BE7-97E9-670F92BC147A@xxxxxxxxxxxxxxxx
> Just to make sure, you are dealing with 3 separate assemblies? The client,
> the server and the remote object? Is the same remote object being
referenced
> by both projects?
>
> I've seen it far too many times in past with my remoting work to have the
> client and server using slightly different versions of the remote object
> assembly, only to give up and throw a hissy fit because of it.
>
> Brendan
>
>
> "Steve" wrote:
>
> > I've been following a couple remoting tutorials on the web, they are all
> > pretty much the same.
> > I've got my different applications built(client, server and remote
object
> > (dll))
> >
> > The client is able to get a reference to the remote object and that
works
> > fine. When I try to make a call to a remote object's method I get an
> > exception:
> > System.Runtime.Serialization.SerializationException: Cannot find the
> > assembly ProcessTest, Version=1.0.2021.22452, Culture=neutral,
> > PublicKeyToken=null.
> >
> > "ProcessTest" is the client application. Now, pasting all my code would
be
> > a little bit much, so I'm hoping that from this error someone will be
able
> > to give me a clue, if not, I can post what I think is the relevant code.
> >
> > Thanks,
> > Steve
> >
> >
> >
Hi Brendan,

Yes, that is a good point and one that could be easily overlooked. I just
rebuilt everything in the following order;
remoteobject
server
client

so the client and server are using the same dll for sure.

I tried running the client again, here is the stack trace that is dumped (it
looks like the exception is happening on the server application?):
Server stack trace:
at
System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembl
y()
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAs
semblyInfo 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.ReadObjectWith
MapTyped(BinaryObjectWithMapTyped record)
at
System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWith
MapTyped(BinaryHeaderEnum binaryHeaderEnum)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at
System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(Head
erHandler handler, __BinaryParser serParser, Boolean fCheck,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(S
tream serializationStream, HeaderHandler handler, Boolean fCheck,
IMethodCallMessage methodCallMessage)
at
System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryRequestMessage
(String objectUri, Stream inputStream, Boolean bStrictBinding,
TypeFilterLevel securityLevel)
at
System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IS
erverChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders
requestHeaders, Stream requestStream, IMessage& responseMsg,
ITransportHeaders& responseHeaders, Stream& responseStream)


.



Relevant Pages

  • Re: remoting options
    ... client project and add a remote object reference just like they have the ... > apply if you're using IIS to host the server) and the version of the ... > application that you want the server to use. ... > client code somehow so that it can be loaded/instantiated on the client. ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: remoting serialization exception
    ... Is the same remote object being ... >> client and server using slightly different versions of the remote object ... > objectId, BinaryAssemblyInfo assemblyInfo, SizedArray ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: help on caller credentials !! :-(
    ... the back end SQL server maybe. ... In fact I simply try to flow the client user until the database level. ... Hosting my remote object in IIS would be much more simple but thi is not my ... under windows 2000 and prefer mode should be "Impersonate". ...
    (microsoft.public.dotnet.security)
  • Re: third post: Marshal by value remoting
    ... The return value of the MBR is the MBV object, ... > has been serialized to the client (and I shouldn't instanciate the object ... > remote object. ... >> on the server and returned to you. ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: SerializationException
    ... my computer is the client and another is a server. ... ObjectReader objectReader, BinaryAssemblyInfo assemblyInfo, ...
    (microsoft.public.dotnet.framework.remoting)

Loading