Click here to Skip to main content
13,346,843 members (23,257 online)
Click here to Skip to main content
Add your own
alternative version


4 bookmarked
Posted 16 Jan 2013

Open Chat using Azure and Windows RT

, 16 Jan 2013
Rate this:
Please Sign up or sign in to vote.
Developing the client and server side for a chat application.


This application demonstrates how to develop a full chat application from scratch using the .NET Framework and Windows Azure. It's a client/server application. The server runs in the cloud as a WCF 4.5 application.  

Download the code 

You can get the code from this link to MSDN


If you are not yet familiar with Windows RT apps, please chek my article Start developing Windows Store apps.

It's better also to have some knowldge about C#, XAML, WCF and Windows Azure. 

The architecture

1- Server side 

The server is a WCF app written in C# and hosted on Windows Azure on this link .

The service contract is provided by the following interface: 

public interface IService1

    bool SignUp(string userName, string password);

    bool IsUserNameExist(string userName);

    List<string> GetAllUsers();

    bool Login(string userName, string password);

    bool SendMessage(string from, string password, string to, 
        string message, DateTime dateTime);

    List<String> GetMyMessages(string userName, string password);

Assuming you have a Windows Azure account, you can publish your service through the Publish option in the menu as shown in the following picture: 

2- Client side  

Two type of clients for this app: a Windows Store App and a WPF app. Both of them are running nearly the same code logic. It consists of a simple window for signing up or signing in. Then, a second window for chatting where you can see registered users, receive your new messages and send messages to any users. 


The window to log in.

The home page for chatting.

The home page in the Windows RT. 

How does it work?

These clients uses the exposed methods from the service to exchange messages. They use the service reference provided from First of all, the user must have a username and password to login, unless, he will have to signup. After that, a list of all users is gotten and bound to a ListView at the left of the window. in addition all the received messages will appear in the middle and will be updated every 5 seconds. To send a message, just write it in the right textbox, choose a destination from the list of users and click Send. Unless an alert message appear to tell you there's an error, then your message is successfully sent.  



This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer Microsoft
Tunisia Tunisia
I'm a Software Engineer and MVP (Client Development). I like writing articles and developing open source software in C#, Windows Phone and Windows 8 applications

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.180111.1 | Last Updated 16 Jan 2013
Article Copyright 2013 by Houssem_Dellai
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid