How to dispose a .Net Remoting Host Server(Server Activated Objects)
2005-04-04 17:29
423 查看
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 like this:
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!
2、Then you should register its ports : Http or Tcp like this:
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!
相关文章推荐
- How to deploy a .Net Remoting Host Server(Server Activated Objects)
- How to Host ASP.Net Web API on IIS Server
- How to debug Web Services or .Net Remoting Components hosted in IIS in Windows 2003 Server
- CodeSnip: How to Get Id of the Record Using ASP.NET and SQL Server 2000
- Drill Into .NET Framework Internals to See How the CLR Creates Runtime Objects
- HOW TO: Upload a File to a Web Server in ASP.NET by Using Visual Basic .NET
- How to Add Linux Host to Nagios Monitoring Server Using NRPE Plugin
- how to design a hardware service use .net remoting
- How to read and save Images in a Sql Server Database using ADO.NET and C#
- How to use TFTP to transfer files from develop board to your host server?
- How to configure the Virtual Path of ASP.NET Development Server to be “Root”
- How to Add Windows Host to Nagios Monitoring Server
- How to use .Net Remoting Configuration files(zz)
- ASP.NET Alerts: how to display message boxes from server-side code?
- How to find user who ran DROP or DELETE statements on your SQL Server Objects
- How to run the .net code within the Sql server
- 转:ASP.NET Web Services or .NET Remoting: How to Choose
- Drill Into .NET Framework Internals to See How the CLR Creates Runtime Objects
- QTP破解失败:Failed to add license code "UNKNOWN" to the license server on host "no-net".
- How to use .net Remoting