Search code examples
c#remoting

The channel 'tcp' is already registered


I want the given application (Windows Service) to act as a remoting server as well as remoting client. In production I will run the two instances of my application monitoring each other over .NET Remoting and will report the failures accordingly.

I have written a basic pieces, and getting "The channel 'tcp' is already registered" exception..I want to set the channel configuration programmatically.


Solution

  • A channel with a specific port number can only be created by one application instance. You need to use different port numbers and channel names for each instance.

    This requires using seperate channel templates (if you are using templates?).