I am making a remote desktop application. When I connect one client I can easy remoting but I cant connect more clients.
MyCode: Server
void start()
{
try
{
URI = "Tcp://"+textBox1.Text+":6600/MyCaptureScreenServer";
chan = new TcpChannel();
ChannelServices.RegisterChannel(chan);
obj = (ScreenCapture)Activator.GetObject(typeof(ScreenCapture), URI);
connected = true;
timer1.Enabled = true;
textBox1.ReadOnly = true;
this.FormBorderStyle = FormBorderStyle.None;// Full Size Mode
this.WindowState = FormWindowState.Maximized;
textBox1.Visible = false;
menuItem5.Enabled = true;
}
catch (Exception) {
stop();
}
}
Client:
TcpChannel chan = new TcpChannel(6600);
ChannelServices.RegisterChannel(chan);
RemotingConfiguration.RegisterWellKnownServiceType(Type.GetType("ScreenCapture, ScreenCapture"), "MyCaptureScreenServer",WellKnownObjectMode.Singleton);