How to get the RealProxy when I know only the transparent proxy
-
30-09-2019 - |
Question
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?
Solution
There's a function in RemotingServices specifically for this:
System.Runtime.Remoting.RemotingServices.GetRealProxy( transparentProxy );
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow