Partager via


Channel priority in remoting

Each remoting channel has a priority associated with it. If there are multiple channels registered in the same appdomain and a MarshalByRefObject is marshalled out, all available channel data will flow with the ObjRef. The order is which this channel data is placed depends on the priority of the channel. You could change the priority of the channel using "priority" entry in configuration or through the IDictionary.

When the ObjRef is deserialized on the client side, each registered client channel will be queried to see if it could handle any of the URLs in the available channelData. Thus the channel with higher priority will get used if it is available on the client. So adjusting priorities can let you choose what channel gets used on the client.