4

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?

Gael Fraiteur
  • 6,759
  • 2
  • 24
  • 31

1 Answers1

12

There's a function in RemotingServices specifically for this:

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

John Gibb
  • 10,603
  • 2
  • 37
  • 48
  • do you know how i can detect the proxy type by just providing th ip, port. is there any class for this in .net – Smith Apr 26 '12 at 01:07