473,461 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

.NET Remoting with Multiple Channels

If you've configured .NET Remoting to use more than one channel of the
same type, for example two TcpClientChannels with unique names, when
you want to create a proxy to a remote object how do you specify which
channel you want that proxy to use?

Thanks in advance.

Jul 17 '06 #1
3 14444
Hi Breet,
how do you specify which
channel you want that proxy to use
You don't. The framework will choose the local channel to use as a
transport when invoking a message on a remote object. The framework will
create a channel for outbound messages if one is not already registered when
a method on the remote object is invoked. If you require call-backs from
the remote object then you must register a channel yourself that is
compatible with the target channel on the server.

Registering multiple channels of the same type on the client, named or
unnamed, is unnecessary in most cases, however if you have multiple proxies
in the same application that each require different channel sinks then you
can separate the proxies into different AppDomains, within the same process,
since the scope of a channel is the AppDomain in which it was registered.

- Dave Sexton

<br****@yahoo.comwrote in message
news:11**********************@35g2000cwc.googlegro ups.com...
If you've configured .NET Remoting to use more than one channel of the
same type, for example two TcpClientChannels with unique names, when
you want to create a proxy to a remote object how do you specify which
channel you want that proxy to use?

Thanks in advance.

Jul 18 '06 #2
Thank you for the reply, but I have to wonder why the remoting
framework would allow us to register multiple channels, especially
channels of the same type, if it won't allow us to select which channel
to use for a given remote object.

For example, say you have a single application that communicates with
two different servers (remote objects), one server uses a secure TCP
channel and the other a non-secure TCP channel. When you create the
remote object references in the client how is the determination made
whether to use the secure or non-secure channel?

Dave Sexton wrote:
Hi Breet,
how do you specify which
channel you want that proxy to use

You don't. The framework will choose the local channel to use as a
transport when invoking a message on a remote object. The framework will
create a channel for outbound messages if one is not already registered when
a method on the remote object is invoked. If you require call-backs from
the remote object then you must register a channel yourself that is
compatible with the target channel on the server.

Registering multiple channels of the same type on the client, named or
unnamed, is unnecessary in most cases, however if you have multiple proxies
in the same application that each require different channel sinks then you
can separate the proxies into different AppDomains, within the same process,
since the scope of a channel is the AppDomain in which it was registered.

- Dave Sexton

<br****@yahoo.comwrote in message
news:11**********************@35g2000cwc.googlegro ups.com...
If you've configured .NET Remoting to use more than one channel of the
same type, for example two TcpClientChannels with unique names, when
you want to create a proxy to a remote object how do you specify which
channel you want that proxy to use?

Thanks in advance.
Jul 18 '06 #3
Hi Breeto,
For example, say you have a single application that communicates with
two different servers (remote objects), one server uses a secure TCP
channel and the other a non-secure TCP channel. When you create the
remote object references in the client how is the determination made
whether to use the secure or non-secure channel?
The port segment of the Uri would be different between the registration of
both objects. If you want to publish several remote objects using multiple
ports you can do so in remoting. Of course each object is then accessible
by any registered channel and therefore any of the registered protocol/port
combinations.

Server-side registration:

Register HttpChannel:81
Register TcpChannel:8080
Register TcpChannel:8081 (Secured)

Register remote object: object1
Register remote object: object2

Valid URIs:

http:// localhost:81/object1
http:// localhost:81/object2
tcp://localhost:8080/object2
tcp://localhost:8081/object1
tcp://localhost:8080/object1
tcp://localhost:8081/object2

The remoting framework will choose an appropriate client channel or create
one if one has not been registered. For secure channels you would have to
register the client channel yourself to specify the security parameters and
credentials, unless the framework just creates a channel with the default
credentials but I doubt that since it would not be very secure for the
framework to assume the default credentials may be sent without explicit
consent from the application.

Use multiple AppDomains on the server if you require that a published object
only be accessible via specific channel sinks or remoting channels
(protocol/port combinations).
Use multiple AppDomains on the client if you require proxies to use specific
channel sinks or remoting channels (protocol/local port combinations).

- Dave Sexton

<br****@yahoo.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
Thank you for the reply, but I have to wonder why the remoting
framework would allow us to register multiple channels, especially
channels of the same type, if it won't allow us to select which channel
to use for a given remote object.

For example, say you have a single application that communicates with
two different servers (remote objects), one server uses a secure TCP
channel and the other a non-secure TCP channel. When you create the
remote object references in the client how is the determination made
whether to use the secure or non-secure channel?

Dave Sexton wrote:
>Hi Breet,
how do you specify which
channel you want that proxy to use

You don't. The framework will choose the local channel to use as a
transport when invoking a message on a remote object. The framework will
create a channel for outbound messages if one is not already registered
when
a method on the remote object is invoked. If you require call-backs from
the remote object then you must register a channel yourself that is
compatible with the target channel on the server.

Registering multiple channels of the same type on the client, named or
unnamed, is unnecessary in most cases, however if you have multiple
proxies
in the same application that each require different channel sinks then
you
can separate the proxies into different AppDomains, within the same
process,
since the scope of a channel is the AppDomain in which it was registered.

- Dave Sexton

<br****@yahoo.comwrote in message
news:11**********************@35g2000cwc.googlegr oups.com...
If you've configured .NET Remoting to use more than one channel of the
same type, for example two TcpClientChannels with unique names, when
you want to create a proxy to a remote object how do you specify which
channel you want that proxy to use?

Thanks in advance.

Jul 18 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: 2G | last post by:
Hi, It seems I can't get remoting to work when my mbrobject is in a larger namespace. I doing ingo's book and when I do the example like it says in the book, all works fine <configuration> ...
5
by: Uchiha Jax | last post by:
Hello all, Given my general greenness when it comes to remoting and my desire to having something relatively stable up and running in the short term I have been considering the purchase of...
3
by: John Fred | last post by:
Salve, I have write a service Windows for the remoting. I have a dll Server (OLD COM+) For Configure DLL Server I user Config File Es. <configuration> <system.runtime.remoting>...
0
by: Feng | last post by:
Hi, I need my remoting server to callback to my client and I am trying to do that using delegate. While the client invoking the server OK, I am getting the following error when the server trying...
0
by: Sebastian Loncar | last post by:
Hi, i have two applications, which communicates very extrem together. With the IPC-Channel i receive often the messages like "all instances of the requested pipe are busy". So i want to use...
2
by: erbilkonuk | last post by:
Hi, I am very new to .NET Remoting and I try to run a simple program to subscribe to an event raised by Remoting Class. The Remoting Server initiates an instance of Remoting Class as Singleton /...
0
by: ShaneN | last post by:
I'm working on a remoting application where the client only references interfaces for all wellknown objects. I currently have an object, Request being exposed: Imports System.Runtime.Remoting...
0
by: =?Utf-8?B?U3RldmUgRw==?= | last post by:
I have a VB6 ActiveX exe application that uses a .Net DLL that is exposed as a COM DLL. The VB6 application is stored in ParentFolder. The .Net DLL is stored and registered in ChildFolder. I have...
0
by: KovarishxD | last post by:
Hi there, I'm using directshow to capture video from eight channels of a capture card. I'm using eight threads, and instantiating a full package of filters for each. My problem is that I'm using...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.