Gael Fraiteur
Gael Fraiteur

Reputation: 6857

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?

Upvotes: 4

Views: 3073

Answers (1)

John Gibb
John Gibb

Reputation: 10773

There's a function in RemotingServices specifically for this:

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

Upvotes: 12

Related Questions