You are currently viewing SignalR implementation with page post back

SignalR implementation with page post back

  • Post published:December 11, 2013

vteam #344 developed a team collaboration web portal, in which anybody can create account for his/her company. Administrator can create different teams/departments and then can add company employees as team/department members.

It has different modules on the client side and with the help of these modules employees can collaborate and share contents with each other like Documents, Videos, Assessments and Feedback Surveys. Users can also schedule/create Activities, Trainings and meetings on the calendar.

New Requirement [One To One Live Text Chat]:

Client had shared following main requirements to add to his existing project which were as follows:

  • Whenever a team member gets login into the application, all other logged in user should be able to see his/her status online and similarly his status should go offline as he signs out.
  • Moreover, there should be a way that one user should be able to live chat with another online user i.e. one to one live chat.
  • The one to one live chat should limit only in between the team members of the same company.


There were different ways to implement the one to one chat and logged in user’s online status online. But after having some research, vteam #344 have finalized to develop the chat module using open-source library called SignalR provided by ASP.NET. Its detailed documentation can be found here:

SignalR allows bi-directional communication between server and client. The main function of this API is to both emit and receive the real time signals/messages from both client and server machines.

The API was mainly built for SPA (Single Page Application Architecture) based web applications. But, vteam #344 had to use it with ASP.NET Web Forms which utilizes the page post back technique. It was a challenging task to utilize the API in this context but we managed to overcome it and used version 1.1.3 of SignalR available at that time to implement the required feature for client.

The chat module works and conversations are retained with Page Post back and even when user navigates between different pages.

Screen Shots:

Following are few screen shots of the chat module:

See all online Team members as currently, two members online and they one can click on the online member to start one to one chat to another:

SignalR implementation with page post back-img-1

The following image of the one to one chat window (Naveed is talking with Salman):

SignalR implementation with page post back-img-2