[Mono-list] .NET Remoting Error on Mono

Gayan Perera gayanper at gmail.com
Thu Oct 13 03:43:41 EDT 2005


i'm tryign to run a sample application on Mono, following is my coding.
client side coding
----------------------------------------------------------------------------------------------------

RemotingService.Service f =(RemotingService.Service)Activator.GetObject(
Type.GetType("RemotingService.Service,RemotingService"),"
tcp://127.0.0.1:1026/HeloService");
Console.WriteLine("Ready Call Press Enter");
Console.ReadLine();
System.Data.DataSet d=f.SayHelo();

foreach (System.Data.DataRow r in d.Tables[0].Rows)
Console.WriteLine(r[1].ToString());

Console.ReadLine();
-----------------------------------------------------------------------------------------------------------------------------

Server Side
------------------------------------------------------------------------------------------------------------
TcpChannel ch=new TcpChannel(1026);
ChannelServices.RegisterChannel(ch);

HeloService o=new HeloService();
ObjRef oref=RemotingServices.Marshal(o,"HeloService",Type.GetType("
RemotingService.Service,RemotingService"));

Console.WriteLine("Listening......");
Console.ReadLine();

RemotingServices.Disconnect(o);

-------------------------------------------------------------------------------------------------------------------------------

when i run this on windows it works fine but in mono it gives the following
error

Unhandled Exception: System.Runtime.Serialization.SerializationException:
Type Mono.Data.Tds.Protocol.TdsInternalException is not marked as
Serializable.

Server stack trace:
in <0x000d4>
System.Runtime.Serialization.Formatters.Binary.BinaryCommon:CheckSerializable(
System.Type type, ISurrogateSelector selector, StreamingContext context)
in <0x00145>
System.Runtime.Serialization.Formatters.Binary.ObjectWriter:GetObjectData (
System.Object obj,
System.Runtime.Serialization.Formatters.Binary.TypeMetadata metadata,
System.Object data)
in <0x00044>
System.Runtime.Serialization.Formatters.Binary.ObjectWriter:WriteObject (
System.IO.BinaryWriter writer, Int64 id, System.Object obj)
in <0x00108>
System.Runtime.Serialization.Formatters.Binary.ObjectWriter:WriteObjectInstance(
System.IO.BinaryWriter writer, System.Object obj, Boolean isValueObject)
in <0x0002d>
System.Runtime.Serialization.Formatters.Binary.ObjectWriter:WriteQueuedObjects(
System.IO.BinaryWriter writer)
in <0x00037>
System.Runtime.Serialization.Formatters.Binary.ObjectWriter:WriteObjectGraph(
System.IO.BinaryWriter writer, System.Object obj,
System.Runtime.Remoting.Messaging.Header[] headers)
in <0x00573>
System.Runtime.Serialization.Formatters.Binary.MessageFormatter:WriteMethodResponse(
System.IO.BinaryWriter writer, System.Object obj,
System.Runtime.Remoting.Messaging.Header[] headers, ISurrogateSelector
surrogateSelector, StreamingContext context, FormatterAssemblyStyle
assemblyFormat, FormatterTypeStyle typeFormat)
in <0x001ae>
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter:Serialize (
System.IO.Stream serializationStream, System.Object graph,
System.Runtime.Remoting.Messaging.Header[] headers)
in <0x00015>
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter:Serialize (
System.IO.Stream serializationStream, System.Object graph)
in <0x0043d>
System.Runtime.Remoting.Channels.BinaryServerFormatterSink:ProcessMessage(IServerChannelSinkStack
sinkStack, IMessage requestMsg, ITransportHeaders
requestHeaders, System.IO.Stream requestStream, IMessage responseMsg,
ITransportHeaders responseHeaders, System.IO.Stream responseStream)

Exception rethrown at [0]:

in <0x006dc> System.Runtime.Remoting.Proxies.RealProxy:PrivateInvoke (
System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg,
System.Exceptionexc,
System.Object[] out_args)


if any body knows the reason for this please let me know, and a solution to
recover from this.

thank you,
Gayan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20051013/6ea1197d/attachment.html


More information about the Mono-list mailing list