[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Specifying channel when calling remote object?

manob

9/30/2004 8:44:00 AM

Hi all!

I have one client (one appdomain).

I want to call two different remote objects. I want to use two
different chains of sinks when I call the two remote objects. (Lets
say calls to one of the remote objects should be encrypted...)

Lets assume I want to use the HTTP channel in both cases.

I intend to register two httpchannels on client startup
("myHttpChannel" and "myHttpEncryptedChannel"), one with encryption
sink and one without.

I would then like to specify witch channel to use when i create a
transparent proxy. How can I do this. I use Activator.GetObject(...)
to create a proxy.

Ingo Rammer wrote in another reply:
> The reason for this is that the registered channel
> is actually only a "template" (or, to use Remoting-speak,
> a chain of ChannelSinkProviders) for the real means of
> communication. As soon as a transparent proxy is created
> (i.e. by calling Activator.GetObject(), Activator.CreateInstance()
> or as a MarshalByRefObject return value of a method call), a real
> sink chain will be created for your proxy.
>
> This sink chain consists of different sinks objects for each and
> every of your proxies. That is, one sink chain is associated
> to exactly one proxy.

To rephrase my question in these terms: How do I spcify which
"template" to use when I create my proxy?

Thank you,
Magnus