[Mono-bugs] [Bug 58608][Nor] Changed - Sending a Signed Assembly using Remoting causes a Serialization Exception

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 26 May 2004 14:05:13 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by gmiyake@carter-inc.com.

http://bugzilla.ximian.com/show_bug.cgi?id=58608

--- shadow/58608	2004-05-26 14:00:33.000000000 -0400
+++ shadow/58608.tmp.16240	2004-05-26 14:05:13.000000000 -0400
@@ -487,6 +487,218 @@
 
 
 ------- Additional Comments From gmiyake@carter-inc.com  2004-05-26 14:00 -------
 Created an attachment (id=7847)
 Source for test code.
 
+
+------- Additional Comments From gmiyake@carter-inc.com  2004-05-26 14:05 -------
+Sorry for not sending all of the test code.
+I am fully signing the assembly.
+
+Test code is attached. (All in the 2nd attachment)
+Ignore the first attachment - it is included in the 2nd attachment.
+
+
+RemotingClient.cs - client side
+RemoteObject.cs - the MarshalByRef object served by the server side.
+RemotingServer.cs - the server side main program.
+AssemblyInfo.cs - the assembly file for the XferObject assembly.
+XferObject.cs - derived from XferObjectBase.cs
+XferObjectBase.cs - base class for XferObject.cs
+XferObjectSimple.cs - just a simple class that is part of the 
+assembly.
+
+The client tries to transfer an XferObjectSimple object to and from 
+the server. The client is running on WinXP/.NET 1.1 and the server 
+is running on Red Hat 9/Mono 0.91.99. (Note: I have not done a 
+recent CVS pull, but am using an update after the beta 1 release.)
+
+When the assembly is not signed, everything works. When the assembly 
+is signed, I get an error when trying to send the XferObjectSimple 
+from the Mono server to the Win client. Sending the XferObjectSimple 
+from WinXP to Mono works whether or not the assembly is signed.
+
+Here is the error message I am getting:
+
+
+Press Enter to start Remoting Client connection to : 
+tcp://starwars:8084/MonoTestServerApplication
+
+
+XferObjectSimple tests -----------------------
+  Sending XferObjectSimple data to server...
+  Receiving XferObjectSimple from server...
+###################################
+RemotingClient caught Exception : 
+System.Runtime.Serialization.SerializationExce
+ption: Cannot find the assembly XferObject, Version=1.0.1607.18139, 
+Culture=neut
+ral, PublicKeyToken=316d799e649bb495.
+
+Server stack trace:
+   at 
+System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.Get
+Assem
+bly()
+   at 
+System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType
+(Binary
+AssemblyInfo assemblyInfo, String name)
+   at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor
+(String obje
+ctName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, 
+Object[] typeInf
+ormationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 
+objectId, Bi
+naryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
+   at System.Runtime.Serialization.Formatters.Binary.ObjectMap.Create
+(String nam
+e, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] 
+typeInformat
+ionA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 
+objectId, BinaryA
+ssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
+   at 
+System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObj
+ectWi
+thMapTyped(BinaryObjectWithMapTyped record)
+   at 
+System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObj
+ectWi
+thMapTyped(BinaryHeaderEnum binaryHeaderEnum)
+   at 
+System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
+   at 
+System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deseriali
+ze(He
+aderHandler handler, __BinaryParser serParser, Boolean fCheck, 
+IMethodCallMessag
+e methodCallMessage)
+   at 
+System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deseri
+alize
+(Stream serializationStream, HeaderHandler handler, Boolean fCheck, 
+IMethodCallM
+essage methodCallMessage)
+   at 
+System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Unsafe
+Deser
+ializeMethodResponse(Stream serializationStream, HeaderHandler 
+handler, IMethodC
+allMessage methodCallMessage)
+   at 
+System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryRespons
+eMess
+age(Stream inputStream, IMethodCallMessage reqMsg, Boolean 
+bStrictBinding)
+   at 
+System.Runtime.Remoting.Channels.BinaryClientFormatterSink.Deserializ
+eMess
+age(IMethodCallMessage mcm, ITransportHeaders headers, Stream stream)
+   at 
+System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProces
+sMess
+age(IMessage msg)
+
+Exception rethrown at [0]:
+   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage
+(IMessage req
+Msg, IMessage retMsg)
+   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
+(MessageData& msgDa
+ta, Int32 type)
+   at RemotingTest.ServerList.GetTestXferObjectSimple() in 
+c:\amadeus\dev\mono\a
+ssmblytest\assemblytest\remotingobject\remotingobject\remoteobject.cs
+:line 38
+   at RemotingTest.RemotingClient.Main() in 
+c:\amadeus\dev\mono\assmblytest\asse
+mblytest\remotingclient\remotingclient.cs:line 52
+
+Server stack trace:
+   at 
+System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.Get
+Assem
+bly()
+   at 
+System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType
+(Binary
+AssemblyInfo assemblyInfo, String name)
+   at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor
+(String obje
+ctName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, 
+Object[] typeInf
+ormationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 
+objectId, Bi
+naryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
+   at System.Runtime.Serialization.Formatters.Binary.ObjectMap.Create
+(String nam
+e, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] 
+typeInformat
+ionA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 
+objectId, BinaryA
+ssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
+   at 
+System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObj
+ectWi
+thMapTyped(BinaryObjectWithMapTyped record)
+   at 
+System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObj
+ectWi
+thMapTyped(BinaryHeaderEnum binaryHeaderEnum)
+   at 
+System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
+   at 
+System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deseriali
+ze(He
+aderHandler handler, __BinaryParser serParser, Boolean fCheck, 
+IMethodCallMessag
+e methodCallMessage)
+   at 
+System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deseri
+alize
+(Stream serializationStream, HeaderHandler handler, Boolean fCheck, 
+IMethodCallM
+essage methodCallMessage)
+   at 
+System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Unsafe
+Deser
+ializeMethodResponse(Stream serializationStream, HeaderHandler 
+handler, IMethodC
+allMessage methodCallMessage)
+   at 
+System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryRespons
+eMess
+age(Stream inputStream, IMethodCallMessage reqMsg, Boolean 
+bStrictBinding)
+   at 
+System.Runtime.Remoting.Channels.BinaryClientFormatterSink.Deserializ
+eMess
+age(IMethodCallMessage mcm, ITransportHeaders headers, Stream stream)
+   at 
+System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProces
+sMess
+age(IMessage msg)
+
+Exception rethrown at [0]:
+   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage
+(IMessage req
+Msg, IMessage retMsg)
+   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
+(MessageData& msgDa
+ta, Int32 type)
+   at RemotingTest.ServerList.GetTestXferObjectSimple() in 
+c:\amadeus\dev\mono\a
+ssmblytest\assemblytest\remotingobject\remotingobject\remoteobject.cs
+:line 38
+   at RemotingTest.RemotingClient.Main() in 
+c:\amadeus\dev\mono\assmblytest\asse
+mblytest\remotingclient\remotingclient.cs:line 52
+###################################
+Done. Press Enter to exit.
+
+
+---------------------------------------------------------------------
+-----
+Thanks
+