Yes it is possible. Try to read this article on building a basic .NET remoting.
Building a Basic .NET Remoting Application
Sample Project
1. Client(Console project).
a. Client.config
<configuration>
<system.runtime.remoting>
<application>
<client>
<wellknown
type="HelloWorld, Host"
url="http://localhost:8989/HelloWorld.rem"
/>
</client>
</application>
</system.runtime.remoting>
</configuration>
b. this piece of code.
RemotingConfiguration.Configure("Client.config");
IHelloWorld objRemote = Activator.GetObject(typeof(IHelloWorld), "http://localhost:8989/HelloWorld.rem") as IHelloWorld;
Console.WriteLine(objRemote.GetString("Print : "));
2. Contract project(Class Library project)
a. IHelloWorld interface
public interface IHelloWorld
{
string GetString(string message);
}
3. Host(Windows service)
a. HelloWorld class
public class HelloWorld : MarshalByRefObject, IHelloWorld
{
public string GetString(string message)
{
return string.Concat(message, " Hello world");
}
public string GetDate()
{
return DateTime.Now.ToString();
}
}
b. Host.config
<configuration>
<system.runtime.remoting>
<application>
<service>
<wellknown
mode="Singleton"
type="Host.HelloWorld, Host"
objectUri="HelloWorld.rem"
/>
</service>
<channels>
<channel ref="http" port="8989"/>
</channels>
</application>
</system.runtime.remoting>
</configuration>
c. Service1 class
public partial class Service1 : ServiceBase
{
public Service1()
{
InitializeComponent();
}
protected override void OnStart(string[] args)
{
HostObject();
}
protected override void OnStop()
{
}
internal void HostObject()
{
RemotingConfiguration.Configure("Host.config");
}
}