本人采用Remoting技术,用IIS实现HTTP协议的传输,但是在客户端连接时,老是提示未注册http信道,客户端对服务器端的连接时断时续。请问是什么原因,该怎么解决?

解决方案 »

  1.   

    那你检查信道注册代码如下:
    ChannelServices.RegisterChannel(new System.Runtime.Remoting.Channels.Http.HttpClientChannel());
      

  2.   

    服务端:
    public static void Main(string[] Args)
    {
    HttpChannel channel = new HttpChannel(8080);
    ChannelServices.RegisterChannel(channel);
    WellKnownServiceTypeEntry WKSTE = new WellKnownServiceTypeEntry(typeof(ServiceClass),"TcpCBOService", WellKnownObjectMode.SingleCall);
    RemotingConfiguration.RegisterWellKnownServiceType(WKSTE);
    Console.WriteLine("服务程序正在侦听,按[回车]退出程序!");
    Console.ReadLine();
    }
    客户端:
    WellKnownClientTypeEntry remotetype = new WellKnownClientTypeEntry(typeof(ServiceClass), "http//ip:8080/TcpCBOService");
    RemotingConfiguration.RegisterWellKnownClientType(remotetype);
    注:ServiceClass 是服务器激活服务类型对象;
    http//ip:8080/TcpCBOService是服务器激活类型的 URI,应与服务端一致。
      

  3.   

    http://wannyjong.cnblogs.com/articles/454833.html将Tcp, 改为Http 即可,看对你是否有帮助。
      

  4.   

    Mark====CSDN 小助手 V2.5 2005年11月05日发布====
    CSDN小助手是一款脱离浏览器也可以访问Csdn论坛的软件
    界面:http://blog.csdn.net/Qqwwee_Com/archive/2005/11/05/523395.aspx
    下载:http://szlawbook.com/csdnv2