1
Reply

.Net remoting problem

keenweng2001

keenweng2001

Sep 23 2004 4:31 AM
2.1k
Hello, i am currently created an application that related to the remoting control. I have created 3 file, can anyone tell me what i am wrong : 1) The remote object (RemoteDesktopDLL.dll) 2) The server implement in window services, this server is together with a web configuration file(RemotingServerWebService.exe.config) 3) the client My problem is after i start the server windows services, the client still not able to connect to the remote object. Below is part of my code: Client ChannelServices.RegisterChannel(new TcpChannel()); RemotingConfiguration.RegisterWellKnownClientType(typeof(CaptureScreen), "tcp://" + machineName + ":8081/RemotingServerWebService/CaptureScreen"); RemoteObj = new CaptureScreen(); Server protected override void OnStart(string[] args) {Thread listenerThread = new Thread(new ThreadStart(this.Listen)); listenerThread.Start();} private void Listen() {try {string fileName = AppDomain.CurrentDomain.BaseDirectory+"RemotingServerWebService.exe.config"; RemotingConfiguration.Configure(fileName); CaptureScreen m=new CaptureScreen(); RemotingServices.Marshal((m),"CaptureScreen"); } RemotingServerWebService.exe.config

Answers (1)