How to get RealProxy when I only know transparent proxy

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

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

How to get RealProxy from a transparent proxy?

+3
source share
1 answer

The RemotingServices function specifically uses the function:

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

+8
source

Source: https://habr.com/ru/post/1760744/


All Articles