Send a suggestion!

We're building a brand new version of the site, and we'd love to hear your ideas

Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

Rated
Read 30,094 times

Contents

Related Categories

A Simple Introduction to .NET Remoting - Introduction

lee.gunn

Introduction

.NET remoting allows the development of distriubuted applications. It allows applications to use objects contained in other processes. These processes can reside on the same local computer or any remote computer that is reachable via a network (including the Internet).

We wil quickly look at the basics on how to set up a simple .NET remoting system. The system will comprise of:

  • A remotable object (Abstract class and implementation)
  • A Host console application which will sit and listen for object requests
  • A Client console applicaiton that will make requests for the remotable object
Note: The host/client apps can be windows service's, asp.net apps, console apps or windows forms apps etc.

Remotable Type

To enable our object to be remotable and hense accessible from other application domains, we have to inherit from System.MarshalByRefObject. Create a new class library project called RemotableType (the assembly should be called RemotableType.dll). Now, add the class belown to the project.

using System;
public class RemotableType : MarshalByRefObject{
  public string RemotableMethod()
  {
    return "Hello Word";
  }
}

Lee Gunn is a freelance Microsoft Certified Developer based in Glasgow, Scotland. Specialising in quality driven Internet solutions, largely built around Microsoft’s .NET platform.

Skills used on a regular basis are:

  • Object Orientated Programming (OOP)
  • Microsoft .NET, C#, Visual Basic.NET
  • MS SQL Server, TSQL
  • ActionScript 2.0
  • XHTML, XML, XSLT, CSS

Comments