Our costumer has Citrix environment For first time application starts it opens a TcpChannel with port 8500 OK. When application runs again (with different process ID) of course open Channel is not possible. But is it possible to "Join" or "Merge" to existing channel?
How do I listen the same port with TcpChannel
Here is the how im registering the channel
mChannel = new TcpChannel(8500);
ChannelServices.RegisterChannel(mChannel, false);
mi_Transfer = new Remote.cTransfer();
mService = RemotingServices.Marshal(mi_Transfer, "GenerateBarcode");
Based on the comments, I would suggest creating a Windows Service (in .NET, a class extending System.ServiceProcess.ServiceBase
), and having the service host the TcpChannel
on port 8500. Then, have each instance of the application that starts up use a dynamic port and register with the service, providing it the user name of the user who launched the application. The service can then use the user names to route the requests it receives on port 8500 to the appropriate instance of the application on the dynamic port.