Click here to Skip to main content
12,955,891 members (63,427 online)
Click here to Skip to main content
Add your own
alternative version


68 bookmarked
Posted 13 Nov 2001

A Simple Chat Application Using .NET Remoting

, 13 Nov 2001
Rate this:
Please Sign up or sign in to vote.
This application demonstrates .NET remoting in LAN.
Sample Image - DotNETChatApplication.gif


The application is a simple chat tool. Anyone who connects to the chat server receives all chat communication between the connected users. The application is deliberately kept simple to clarify .NET remoting. This application also demonstrates event and delegate usage in an application that uses .NET remoting.


Most of you will have noticed that there are wizards to develop ASP.NET web services in Visual Studio .NET. However, if you want to develop a Client/Server application that runs over a local area network, there are no wizards available. This application shows how to do .NET remoting in a Local Area Network. This application acts much like a DCOM server and client application. This Visual Studio .NET solution contains three modules.

  1. ChatCoordinator: The server implementation.
  2. ChatClient: The client implementation.
  3. ChatServer: The runtime host for Chat coordinator.

This uses HTTP protocol schema and sends the messages through an HTTP channel. The remoting configuration is specified in the ChatClient.exe.config file and the ChatServer.exe.config file.

How to Build the Application

  • Step-1: Extract the file
  • Step-2: Open the file ChatApplication.sln in Visual studio .NET.
  • Step-3: Build the Solution.

How to Run the Application

  • Step-1: Locate the folder Output under the project folder.
  • Step-2: Run the server application ChatServer.exe.
  • Step-3: Run the chat client ChatClient.exe.

This application runs on a single computer or across a network. If you want to run this application over a network, you must replace "localhost" in the client configuration with the name of the remote computer. Modify the following line in Client.exe.config:

<wellknown type="ChatCoordinator.ChatCenter, ChatCoordinator" 

    url="http://localhost:100/ChatServer" />

<wellknown type="ChatCoordinator.ChatCenter, ChatCoordinator" 

    url="http://your machine name:100/ChatServer" />

Also make sure that the ChatServer.exe is running before you run ChatClient.exe.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Anil Kumar
United States United States
No Biography provided

You may also be interested in...


Comments and Discussions

GeneralMFC app stopped working.. Pin
Member 443453613-Mar-09 20:22
memberMember 443453613-Mar-09 20:22 
GeneralNot Compiling Pin
mdubey822-Jun-08 2:21
membermdubey822-Jun-08 2:21 
QuestionCannot find config files in the zip Pin
Member 67099211-Dec-07 9:20
memberMember 67099211-Dec-07 9:20 
GeneralDotNETChatApplication Pin
sephr7-Nov-07 20:13
membersephr7-Nov-07 20:13 
GeneralRequested service not found exception in dotnet remoting Pin
Lavans10-Dec-06 23:50
memberLavans10-Dec-06 23:50 
GeneralRe: Requested service not found exception in dotnet remoting Pin
ghumman6312-Apr-07 20:04
memberghumman6312-Apr-07 20:04 
Questionmissing chatserver.exe.config Pin
msushmitha30-Nov-06 20:50
membermsushmitha30-Nov-06 20:50 
Questionmissing chatserver.exe.config Pin
palikila_indu30-Nov-06 20:38
memberpalikila_indu30-Nov-06 20:38 
Questionerror help Pin
MythiliPattabiraman7-Sep-06 22:58
memberMythiliPattabiraman7-Sep-06 22:58 
GeneralError of cross-thread.... Pin
pannujagwinder23-Aug-06 8:10
memberpannujagwinder23-Aug-06 8:10 
AnswerRe: Error of cross-thread.... Pin
@Jim15-Aug-07 12:43
member@Jim15-Aug-07 12:43 
GeneralNot working on LAN [modified] Pin
assssssssssurya26-Jul-06 0:19
memberassssssssssurya26-Jul-06 0:19 
GeneralCannot run over the LAN Pin
The_Fixer_8327-Mar-06 9:08
memberThe_Fixer_8327-Mar-06 9:08 
GeneralRe: Cannot run over the LAN Pin
@Jim15-Aug-07 13:20
member@Jim15-Aug-07 13:20 
QuestionSNMP Application Pin
priyeshtinku23-Mar-06 19:37
memberpriyeshtinku23-Mar-06 19:37 
QuestionUnable to update richTextMessage Pin
devchandc16-Nov-05 6:53
memberdevchandc16-Nov-05 6:53 
Generalerror Pin
soul_reaver22-Sep-05 9:02
membersoul_reaver22-Sep-05 9:02 
GeneralConnection refused Pin
bellerofonte1-Sep-04 23:49
memberbellerofonte1-Sep-04 23:49 
General'System.IO.FileNotFoundException' Pin
Virgil Reboton15-Jun-04 3:49
memberVirgil Reboton15-Jun-04 3:49 
GeneralRe: 'System.IO.FileNotFoundException' Pin
ervisdee21-Apr-08 21:13
memberervisdee21-Apr-08 21:13 
GeneralRe: 'System.IO.FileNotFoundException' Pin
Member 41608312-Oct-08 8:09
memberMember 41608312-Oct-08 8:09 
GeneralMessage to one specific client Pin
HolgerK30-Mar-04 7:31
memberHolgerK30-Mar-04 7:31 
GeneralDocumentating the project!! Pin
vishwa_3125-Mar-04 10:56
membervishwa_3125-Mar-04 10:56 
Generalstore Chat in Sql database Pin
invytiffany16-Mar-04 6:27
memberinvytiffany16-Mar-04 6:27 
GeneralRe: store Chat in Sql database Pin
H_LionHeart30-Sep-04 14:14
memberH_LionHeart30-Sep-04 14:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170525.1 | Last Updated 14 Nov 2001
Article Copyright 2001 by Anil Kumar
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid