How to run Remote Application
The .NET Remoting is one of several ways to establish communication between application domains using the .NET Framework.
The Remoting Framework consists of three key components: a Remotable Object that provides the functionality to be accessed remotely, a Listener Application responsible for receiving and processing requests for the remote object, and a Client Application that initiates requests for the remote object. Furthermore, configuration files are essential for both the Listener Application and the Client Application, as they contain the necessary settings and communication information to ensure smooth and reliable interaction within the remoting environment.
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 :
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
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 .
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.
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.
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.
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 ...