CSharp.Net-Informations.com
   Home      .Net Framework      VB.NET      C#                                                                      About


  How to run Remote Application

The .NET Remoting is one of several ways to establish communication between application domains using the .NET Framework.

The main three components of a Remoting Framework are a Remotable Object , Listener Application for listening requests for remote object and a Client Application makes requests for remote object. Additionally you need Configuration files for your Listener Application and Client Application .

How to compiling the C# source code files ?

Create a new folder SRC in c:\ and put the three C# source code files in that folder.

The files are :

1. C# Remotable Object

2. C# Remote Listener Application - (listening requests for Remote Object)

3. C# Remote Client Application - (makes requests for Remote Object)

Add the two configuration files in the same folder (c:\src).

1. download TimeListener.exe.config

2. download Client.exe.config

Now total of 5 files in your c:\src folder.

Compile each C# class files using the command-line tools separately that ship with the Visual Studio SDK .

  csc /t:library RemoteTime.cs
  csc /r:RemoteTime.dll TimeListener.cs

csc /r:RemoteTime.dll Client.cs

Note: You have to provide the physical path of each source files when you compile the source code , for example : if the source code files are in the folder c:\SRC , you have to give path like

  csc /t:library c:\src\RemoteTime.cs
  csc /r:c:\src\RemoteTime.dll c:\src\TimeListener.vb

csc /r:c:\src\RemoteTime.dll c:\src\Client.cs

After you complied the C# source code files, you will get additional three files in the c:\src folder.

They are :

  RemoteTime.dll
  TimeListener.exe

Client.exe

Now total of 8 files in your c:\src folder.

How to run the Remoting Application ?

Create two new folders and give the name like Server and Client respectively in c:\src folder.

Copy RemoteTime.dll , TimeListener.exe and TimeListener.exe.config to the c:\src\server folder.

Copy RemoteTime.dll , Client.exe and Client.exe.config to the c:\src\client folder.

Open a command prompt on Server folder and type TimeListener

  c:\src\server TimeListener

Then you will get a screen showing "Listening for requests from the Client. Press Enter to exit..."

Open a command prompt on Client folder and type Client.

  c:\src\client Client

Then you will get the current time from Remote Object.

Now you have done your first .Net Remoting C# Project successfully . Try to explore more on Remoting ...

        
        
C# Tutorial




Csharp Remoting Related Contents
*     C# Remoting Architecture
*     C# Remoting application
*     C# Remotable Object
*     C# Remote Listener Object
*     C# Remote Client Object
*     How to Remote Application Configuration
*     How to Remote Activation
*     How to Remoting Channels
*     How to Remoting Formatters


   Home      VB.NET      C#
CSharp Related Topics
*     An overview of Microsoft CSharp
*     C# Language Tutorial
*     C# Statements Tutorial
*     C# Collection Tutorial
*     C# String Tutorial
*     C# File Operations Tutorial
*     C# Excel Tutorial
*     C# Crystal Reports Tutorial
*     CSharp Communication Tutorial
*     C# Ado.Net Tutorial and Source Code
*     C# ADO.NET data Providers Tutorial
*     C# Dataset Tutorial
*     C# DataAdapater Tutorial
*     Csharp DataView Tutorial
*     Csharp Remoting Tutorial
*     C# XML Tutorial
*     C# DataGridView Tutorial
   Home      VB.NET      C#
More Source Code :   
Mail to :  feedback@net-informations.com
  |  Home   |  VB.NET   |  C#   |  SiteMap   |  Terms of Use   |  About   |
net-informations.com (C) 2010
All Rights Reserved. All other trademarks are property of their respective owners.