1、First and foremost you should refer your own Assembly then define a Class derived from "MarshalByRefObject" !

2、Then you should register its  ports : Http or Tcp as following:

    HttpChannel cnl=new HttpChannel(7608);

    ChannelServices.RegisterChannel(cnl);

    or

     TcpChannel cnl=new TcpChannel(7711);

     ChannelServices.RegisterChannel(cnl);

3、define a ApplicationName---be equal to IIS application,like this: 

      RemotingConfiguration.ApplicationName="TranserRemotingService"

4、define a  Well Known Service Type Entry

     WellKnownServiceTypeEntry ETR=new(WellKnownServiceTypeEntry (typeof("your class"),"OBJURL",WellKnownObjectMode.SingleCall  or WellKnownObjectMode.Singleton ));

5、Register this Entry

RemotingConfiguration.RegisterWellKnownServiceType(ETR);

 Ok,now you can establish your client to test your Host Server!

相关文章:

  • 2021-11-11
  • 2021-07-17
  • 2021-09-04
  • 2021-09-27
  • 2022-12-23
  • 2021-06-27
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-04
  • 2022-02-03
  • 2022-12-23
  • 2021-04-25
  • 2021-12-08
  • 2021-11-28
  • 2021-12-14
相关资源
相似解决方案