Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the RealProxy when I know only the transparent proxy

I have a transparent proxy, for instance one generated by WCF:

        ChannelFactory<ICalculator> channelFactory = 
            new ChannelFactory<ICalculator>(
              new NetNamedPipeBinding(),
              "net.pipe://localhost/WcfTransparentProxy/Calculator" );
        ICalculator calculator = channelFactory.CreateChannel();

How do I get the RealProxy from the transparent proxy?

like image 378
Gael Fraiteur Avatar asked Dec 16 '22 22:12

Gael Fraiteur


1 Answers

There's a function in RemotingServices specifically for this:

System.Runtime.Remoting.RemotingServices.GetRealProxy( transparentProxy );

like image 79
John Gibb Avatar answered May 25 '23 02:05

John Gibb