[Mono-list] Remoting
Wilhelm Patrick
Patrick.Wilhelm@khe.siemens.de
Mon, 4 Aug 2003 16:00:01 +0200
Hi!
I've a Problem using the remoting system of mono in my project. First of
all, hier is my code I use for initialization the client or server mode:
switch (appMode)
{
default:
case AppMode.Server:
// Register a new channel with the runtime remoting services
ChannelServices.RegisterChannel(new TcpChannel(13100));
// Register a type as a well-known type
RemotingConfiguration.RegisterWellKnownServiceType(
typeof(RemoteCtrl),
"remotectrl",
WellKnownObjectMode.Singleton
);
//...
break;
case AppMode.Client:
RemotingConfiguration.RegisterWellKnownServiceType(
typeof(RemoteCtrl),
"remotectrl",
WellKnownObjectMode.Singleton
);
RemoteCtrl remoteCtrl =
(RemoteCtrl)RemotingServices.Connect(
typeof(RemoteCtrl),
"tcp://localhost:13100/remotectrl"
);
remoteCtrl.GetPatternGeneratorCtrl(out patGenCtrl);
//...
break;
}
under windows everything work's fine, but when I try to run it under linux I
get errors: (the error is on client side: running the server doesn't make
any problems. For testing I run server and client on the same machine. I
have no firewall on my system)
first I run my server:
LINUX-S-01: # mono programm.exe -server
then I try to start the client from another console:
LINUX-S-01: # mono programm.exe -client
Unhandled Exception: System.Runtime.Remoting.RemotingException: Cannot
create channel sink to connect to URL tcp://localhost:13100/remotectrl. An
appropriate channel has probably not been registered.
in <0x00079> 00
System.Runtime.Remoting.RemotingServices:GetClientChannelSinkChain
(string,object,string&)
in <0x000c6> 00
System.Runtime.Remoting.RemotingServices:GetOrCreateClientIdentity
(System.Runtime.Remoting.ObjRef,System.Type)
in <0x00017> 00 System.Runtime.Remoting.RemotingServices:GetRemoteObject
(System.Runtime.Remoting.ObjRef,System.Type)
in <0x00047> 00 System.Runtime.Remoting.RemotingServices:Connect
(System.Type,string)
in <0x00154> 00 NProg.MainFrame:Init ()
in <0x000d5> 00 NProg.MainFrame:.ctor (string[])
in <0x0002e> 00 NProg.ProgApp:OnInit ()
in <0x00011> 00 wx.App:AppInitializer (object,wx.Event)
in <0x0005a> 01 System.MulticastDelegate:invoke_void_object_Event
(object,wx.Event)
in <0x0006c> 00 wx.EvtHandler:MarshalEvent (intptr,int)
in <0x00035> 05 wx.EvtHandler:MarshalEvent (intptr,int)
in (unmanaged) 06 wx.App:wxApp_Run (int,string[])
in <0x00004> 06 wx.App:wxApp_Run (int,string[])
in <0x00026> 00 wx.App:Run ()
in <0x0003d> 00 NProg.ProgApp:Main (string[])
Segmentation fault
Can you tell me, why my program runs under windows but not under linux?
ok, I tried to use the mono-debugger, but it seems, that the debugger dosn't
work with the tools I use in my project: I use wxWindows with wx.NET for the
GUI and the first object that is created in main() is a object from wx.NET.
When I want to debug my application and type "continue" in the console
debugger, the programm ends immediately with "System.MissingMethodException"
and "Process @4 terminated normally". When mono-debugger loads my program I
get many "undefined symbol" warnings (which cause the
MissinMethodeException) in "libwx-c.so" (this lib is used for interactivity
between mono wx.NET and wxWindows.) I don't get this warnings when I start
my program with "mono program.exe" or "mono --debug program.exe".
I use the following versions:
mono-0.25
mono-debugger-0.4
wxWindows-2.4.1 (with gtk2)
wx.NET20030714
gtk-sharp-0.10
libgc-mono-6.1
Distribution:
Suse 8.2
Hope anyone can help me with the remoting problem.
Thank you for your help!
SIEMENS AG
Patrick Wilhelm
A&D SE DT RD
Siemensallee 84
D-76181 Karlsruhe, Germany
Email: patrick.wilhelm@khe.siemens.de
<mailto:patrick.wilhelm@khe.siemens.de>
Tel.: +49 (721) 595 3075