[Mono-bugs] [Bug 53017][Wis] New - Remoting Interop between Microsoft CLR 1.0 on Windows and Mono on Linux passing DataTables
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 18 Jan 2004 07:18:31 -0500 (EST)
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 matt.davey@finetix.com.
http://bugzilla.ximian.com/show_bug.cgi?id=53017
--- shadow/53017 2004-01-18 07:18:31.000000000 -0500
+++ shadow/53017.tmp.30767 2004-01-18 07:18:31.000000000 -0500
@@ -0,0 +1,119 @@
+Bug#: 53017
+Product: Mono/Runtime
+Version: unspecified
+OS:
+OS Details: Windows/Linux
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: matt.davey@finetix.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Remoting Interop between Microsoft CLR 1.0 on Windows and Mono on Linux passing DataTables
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+
+Configuraton: RedHat 9.0 with Mono 0.29.99, Windows XP with Microsoft CLR
+1.0
+
+Description of Problem:
+
+
+Steps to reproduce the problem:
+1. Server side, in a Mono Remoting server running on RedHat, create a
+datatable with 1 column and no data
+
+DataTable ds = new DataTable();
+DataColumn myDataColumn = new DataColumn();
+myDataColumn.DataType = typeof(System.String);
+myDataColumn.ColumnName = "Bob";
+ds.Columns.Add(myDataColumn);
+
+2. Pass the DataTable as a parameter to a method called on the client -
+ie a client callback
+
+3. This error server side is generated:
+
+File 'System.Data' not found.in (unmanaged)
+/usr/local/lib/libmono.so.0(mono_raise_exception+0x1b) [0x4008092b]
+in (unmanaged) /usr/local/lib/libmono.so.0 [0x40091c49]
+in <0x00044> (wrapper remoting-invoke)
+clientcomlib.ClientCallback:SendDataSet
+(System.Data.DataTable)
+in <0x00249> servicecomlib.HelloServer:CallClient (comlib.IClientCallback)
+
+Actual Results:
+
+File 'System.Data' not found.in (unmanaged)
+/usr/local/lib/libmono.so.0(mono_raise_exception+0x1b) [0x4008092b]
+in (unmanaged) /usr/local/lib/libmono.so.0 [0x40091c49]
+in <0x00044> (wrapper remoting-invoke)
+clientcomlib.ClientCallback:SendDataSet
+(System.Data.DataTable)
+in <0x00249> servicecomlib.HelloServer:CallClient (comlib.IClientCallback)
+
+Expected Results:
+
+DataTable should have been marshalled from Server to client sucessfully
+
+How often does this happen?
+
+Always
+
+Additional Information:
+
+client side code:
+
+public class ClientCallback : MarshalByRefObject, IClientCallback
+{
+public void SendDataSet(DataTable ds)
+{
+Console.WriteLine("ClientCallback.SendDataSet was called");
+}
+}
+
+static void Main(string[] args)
+{
+string svr = "tcp://"+ args[0] + ":8085/Test.rem";
+ChannelServices.RegisterChannel(new TcpChannel(0));
+IServerObject s = Activator.GetObject(typeof(IServerObject),svr) as
+IServerObject;
+ClientCallback c = new ClientCallback();
+Console.WriteLine("Passing client object to server");
+s.CallClient(c);
+}
+
+
+server code:
+
+static void Main(string[] args)
+{
+ChannelServices.RegisterChannel(new TcpChannel(8085));
+RemotingConfiguration.RegisterWellKnownServiceType(typeof
+(servicecomlib.HelloServer),"Test.rem", WellKnownObjectMode.Singleton);
+Console.ReadLine();
+}
+
+public class HelloServer: MarshalByRefObject , IServerObject
+{
+ public HelloServer()
+ {
+ Console.WriteLine("HelloServer constructor");
+ }
+
+ public void CallClient(IClientCallback c)
+ {
+ DataTable ds = new DataTable();
+ DataColumn myDataColumn = new DataColumn();
+ myDataColumn.DataType = typeof(System.String);
+ myDataColumn.ColumnName = "Bob";
+ ds.Columns.Add(myDataColumn);
+ c.SendDataSet(ds);
+ }
+}