首页 新闻 会员 周边 捐助

如何将Remoting转换成HTTP

0
悬赏园豆:10 [已关闭问题] 解决于 2015-03-30 09:46
public class Remoting
    {
        private static readonly string objectUri = "Flight.IntFare.ComputeService.rem";

        public static void Start()
        {
            RemotingConfiguration.RegisterWellKnownServiceType(
                typeof(FlightFare.IntFarePlatform.ComputeService.ComputeEngine),
                objectUri, WellKnownObjectMode.SingleCall);
            BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider();
            BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider();
            serverProvider.TypeFilterLevel = TypeFilterLevel.Full;
            IDictionary props = new Hashtable();
            props["name"] = "tcp" + ComputeManager.EnvironmentInfo.Port;
            props["port"] = ComputeManager.EnvironmentInfo.Port;
            TcpChannel channel = new TcpChannel(props, clientProvider, serverProvider);
            ChannelServices.RegisterChannel(channel, false);

        }
    }

现在系统里用的是这样的,不晓得咋搞成HTTP协议的,不懂啊,大神们有啥好的建议吗

Freedom0619的主页 Freedom0619 | 初学一级 | 园豆:10
提问于:2015-03-27 13:53
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册