【问题标题】:How to get the RealProxy when I know only the transparent proxy当我只知道透明代理时如何获取 RealProxy
【发布时间】:2010-08-20 13:26:44
【问题描述】:

我有一个透明代理,例如由 WCF 生成的一个:

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

如何从透明代理获取 RealProxy?

【问题讨论】:

    标签: .net wcf realproxy transparentproxy


    【解决方案1】:

    RemotingServices 中有一个专门用于此的功能:

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

    【讨论】:

    • 谢谢!这就是我一直在寻找的。​​span>
    • 你知道我如何通过提供 ip、端口来检测代理类型吗? .net 中有没有这方面的课程
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多