您的位置:首页 > 移动开发 > Objective-C

How to deploy a .Net Remoting Host Server(Server Activated Objects)

2005-04-05 15:14 465 查看
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!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: