|
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using System.Runtime.Remoting.Channels.Http;
namespace JQD
{
public class RemoteObjectLoader
{
public void Load()
{
RemotingConfiguration.Configure("CLRMHost.Exe.Config");
}
public void LoadTestOnly()
{
// type http://localhost:10002/MyClassURI?WSDL to test
ChannelServices.RegisterChannel(new HttpChannel(10002));
RemotingConfiguration.RegisterWellKnownServiceType(typeof(JQD.MyClass),
"MyClassURI", WellKnownObjectMode.SingleCall);
}
}
public class MyClass : MarshalByRefObject
{
public string Test()
{
return "Test TCP Remtoing Host with Server GC ";
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am a Microsoft Certified Application Developer (MCAD), currently focusing on using .Net Framework to develop Business Solutions. I am mostly language neutral. I have used C, C++, ATL, MFC, VB.Net, C#, VB 6, PL/SQL, Transact SQL, ASP, Fortran, etc.