Click here to Skip to main content
11,797,355 members (75,947 online)
Click here to Skip to main content

A. R. Live Support: XML Based Customer Support Chat Solution

, 16 Dec 2008 CPOL 79K 4.7K 80
Rate this:
Please Sign up or sign in to vote.
Customer Support chat solution build using ASP.NET(2.0) with C# and XML as a database.




I have checked out a lot of chat solutions and all of then were database driven. These applications fail as soon as the database is down and in live systems, this scenario is not unknown. So, I decided to build a Chat Solution that should be database independent. So, XML is the best replacement.

This is my first article and A. R. Live Support is the first solution I have developed using XML.


A. R. Live Support is an online chat software, developed in ASP.NET(2.0) and XML. It is easy to use and facilitates 1-o-1 live communication between customers and executives. It is a flexible live chat software that provides the customer support with a click.

The main features are:

  1. Built with HTML, JavaScript, XML, C#, using Ajax techniques
  2. NO DATABASE: No need for a database (since it is XML based)
  3. No Flashing: Based on advanced Ajax techniques, the chat screen refreshes every second(this can be customized), and changes on the screen do not require a screen refresh
  4. NO ACTIVEX or PLUGINS, etc. - because it is not Java based, the user does not need to install plugins, or have Java components on the machine. A combination of JavaScript, XML and C# ASP.NET makes this possible.
  5. NO MEMORY STORAGE for messages, users; everything gets stored in XML files. This feature allows several chat rooms and even chat applications to run on the same server.
  6. EASY TO INSTALL - Just unzip a *.zip file on the server, create a virtual directory, and the chat is ready.
  7. ANY MAJOR BROWSER OK - Internet Explorer, Netscape, Mozilla Firefox, Opera

Code Walkthrough

  1. I will start from a code that will be used to call the Server repeatedly for fetching the most recent information:

    function InitializeTimer()
        // Set the length of the timer,
        // in seconds. Your choice
        secs = 2;
    function StopTheClock()
        timerRunning = false
    function StartTheTimer()
        if (secs==0)
            //Generate a Postback to the server
            // Start the timer again
            secs = secs - 1;
            timerRunning = true;
            timerID = self.setTimeout("StartTheTimer()", delay);
    //AJAX Function
    function makeRequest()
    	var xmlHttpRequest = null;
    	* For Firefox, Mozilla, Safari
    	if (window.XMLHttpRequest)
    		xmlHttpRequest = new XMLHttpRequest();
    	* For Microsoft Internet Explorer
    	else if (typeof ActiveXObject != "undefined")
    		xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
    	return xmlHttpRequest;
    }//END of Function makeRequest
    function ajax_MakeAnAJAXGetCall()
    	ajaxObj = makeRequest();
    	if (ajaxObj != null)
    		var dt = new Date();		
    		var URL = serverURL;
    		URL += '?id=' + document.getElementById('lblID').innerHTML + 
    			'&dt1=' + dt.getHours()+ '&dt2=' + dt.getMinutes();
    		StopTheClock();"GET", URL, true);
    		ajaxObj.onreadystatechange = ajax_CallBack;
    	return false;
    function OpenPop(strId)
    {'execChatWindow.aspx?id=' + strId,'','width=520,height=490');
    function ContactServer()
    	ajax_MakeAnAJAXGetCall(); //THis makes Ajax call to run 
  2. Server side code to fetch the messages for User/Executive:

    string strResult = string.Empty;
      string chatId = Request.QueryString["cid"].ToString();
      string strXML = chatId + ".XML";  
      strResult = clsChatMessages.getUnReadMessages(Request.PhysicalApplicationPath, 
    		strXML,Request.QueryString["id"].ToString(), true);

Points of Interest

  1. Chat is fully customizable, i.e. there are a lot of interesting settings in web.config.
  2. Initially it does not provide any reporting, but that can be generated using XML files.


  • 09-Nov-2008
    • Initial post of article
  • 18-Nov-2008
    • Selection of Departments for the Chat
    • [Bug Fix] in chat allocation
  • 16-Dec-2008
    • Chat Transfer between Executives
    • Password Encryption [RSA]


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


About the Author

Aman Bhullar
Team Leader
India India
No Biography provided

You may also be interested in...

Comments and Discussions

Generalerror when user want to chat with excutive Pin
amirsamanipoor28-Apr-15 3:22
memberamirsamanipoor28-Apr-15 3:22 
QuestionHi.. Having chat.dll issue Pin
Member 1126227325-Nov-14 2:15
memberMember 1126227325-Nov-14 2:15 
Questionsharing files or images in chat Pin
imran RP28-Sep-14 1:09
memberimran RP28-Sep-14 1:09 
AnswerRe: sharing files or images in chat Pin
Aman Bhullar13-Oct-14 3:27
memberAman Bhullar13-Oct-14 3:27 
QuestionChat.dll Pin
Nico_Travassos26-Jun-14 4:01
memberNico_Travassos26-Jun-14 4:01 
AnswerRe: Chat.dll Pin
Aman Bhullar8-Jul-14 5:33
memberAman Bhullar8-Jul-14 5:33 
QuestionI Cant Use this :( Pin
sara-98418-May-14 20:46
membersara-98418-May-14 20:46 
AnswerRe: I Cant Use this :( Pin
Aman Bhullar19-May-14 23:55
memberAman Bhullar19-May-14 23:55 
Questionclose the client windows Pin
Member 105260156-Feb-14 7:40
memberMember 105260156-Feb-14 7:40 
Questionchat notification Pin
Member 896470922-Jun-13 2:41
memberMember 896470922-Jun-13 2:41 
AnswerRe: chat notification Pin
Aman Bhullar26-Jun-13 5:50
memberAman Bhullar26-Jun-13 5:50 
GeneralRe: chat notification Pin
Member 896470926-Jun-13 10:31
memberMember 896470926-Jun-13 10:31 
GeneralRe: chat notification Pin
Aman Bhullar1-Jul-13 4:50
memberAman Bhullar1-Jul-13 4:50 
QuestionCan you transfer a chat to another operator Pin
Member 100945125-Jun-13 6:30
memberMember 100945125-Jun-13 6:30 
Questionproject doesnt have a good document Pin
amirsamani1-Jun-13 0:51
memberamirsamani1-Jun-13 0:51 
QuestionPost a Java version Pin
52215178218-Dec-12 19:25
member52215178218-Dec-12 19:25 
AnswerRe: Post a Java version Pin
Aman Bhullar23-Dec-12 21:52
memberAman Bhullar23-Dec-12 21:52 
QuestionCan we change the brand name? Pin
Amit D Rajput4-Nov-12 23:05
memberAmit D Rajput4-Nov-12 23:05 
AnswerRe: Can we change the brand name? Pin
Aman Bhullar9-Dec-12 23:00
memberAman Bhullar9-Dec-12 23:00 
QuestionChat.DLL Pin
solgen31-Jul-12 15:34
membersolgen31-Jul-12 15:34 
AnswerRe: Chat.DLL Pin
Aman Bhullar23-Aug-12 19:22
memberAman Bhullar23-Aug-12 19:22 
AnswerRe: Chat.DLL Pin
amirsamani1-Jun-13 0:47
memberamirsamani1-Jun-13 0:47 
GeneralRe: Chat.DLL Pin
Aman Bhullar6-Jun-13 1:37
memberAman Bhullar6-Jun-13 1:37 
QuestionUsing this in my project Pin
mrkeivan13-Feb-12 19:22
membermrkeivan13-Feb-12 19:22 
AnswerRe: Using this in my project Pin
Aman Bhullar6-Jun-13 1:41
memberAman Bhullar6-Jun-13 1:41 
QuestionMalicious code block Pin
Member 84573795-Dec-11 11:02
memberMember 84573795-Dec-11 11:02 
Questiondepartmen Pin
tolgagim13-Nov-11 12:39
membertolgagim13-Nov-11 12:39 
Help Me Please , why deparment is null on pages, when i look department.xml it is not null but when i try to chat all of pages that use departmen is nulll
AnswerRe: departmen Pin
Aman Bhullar21-Nov-11 6:17
memberAman Bhullar21-Nov-11 6:17 
Questioncan you upload class file also. instead of dll Pin
ktoby16-Jul-11 10:18
memberktoby16-Jul-11 10:18 
GeneralHi Pin
davidcandia30-Apr-11 11:36
memberdavidcandia30-Apr-11 11:36 
GeneralRe: Hi Pin
Aman Bhullar17-May-11 6:07
memberAman Bhullar17-May-11 6:07 
GeneralMy vote of 5 Pin
bahmandb29-Apr-11 9:26
memberbahmandb29-Apr-11 9:26 
Generalfull solution Pin
amr rabie17-Apr-11 12:04
memberamr rabie17-Apr-11 12:04 
GeneralRe: full solution Pin
Aman Bhullar25-Apr-11 6:00
memberAman Bhullar25-Apr-11 6:00 
GeneralRegarding the flow of this application Pin
Member 390017229-Dec-10 3:14
memberMember 390017229-Dec-10 3:14 
GeneralRe: Regarding the flow of this application Pin
Rohit_kakria3-Feb-11 1:12
memberRohit_kakria3-Feb-11 1:12 
GeneralRe: Regarding the flow of this application Pin
Aman Bhullar3-Feb-11 4:34
memberAman Bhullar3-Feb-11 4:34 
GeneralMy vote of 4 Pin
Pablo Castillo16-Aug-10 8:32
memberPablo Castillo16-Aug-10 8:32 
GeneralSecurity Awareness Pin
bokohut3-Dec-09 6:44
memberbokohut3-Dec-09 6:44 
GeneralRe: Security Awareness Pin
theripevessel14-Jan-10 8:40
membertheripevessel14-Jan-10 8:40 
QuestionNew Improvements? Pin
rodusa200729-Sep-09 18:09
memberrodusa200729-Sep-09 18:09 
AnswerRe: New Improvements? Pin
Aman Bhullar30-Sep-09 5:24
memberAman Bhullar30-Sep-09 5:24 
GeneralNeed to implement chat on project Pin
Masakhane10-Sep-09 0:04
memberMasakhane10-Sep-09 0:04 
GeneralRe: Need to implement chat on project Pin
Aman Bhullar10-Sep-09 6:11
memberAman Bhullar10-Sep-09 6:11 
QuestionWhat if u want to chat with ur friends Pin
vaah24-Jul-09 8:05
membervaah24-Jul-09 8:05 
AnswerRe: What if u want to chat with ur friends Pin
Aman Bhullar27-Jul-09 5:30
memberAman Bhullar27-Jul-09 5:30 
GeneralRe: What if u want to chat with ur friends Pin
vaah27-Jul-09 5:35
membervaah27-Jul-09 5:35 
GeneralRe: What if u want to chat with ur friends Pin
Aman Bhullar28-Jul-09 5:41
memberAman Bhullar28-Jul-09 5:41 
QuestionMessage is showing arlivesupport Pin
Rohit_kakria26-Jun-09 2:25
memberRohit_kakria26-Jun-09 2:25 
AnswerRe: Message is showing arlivesupport Pin
Rohit_kakria26-Jun-09 22:37
memberRohit_kakria26-Jun-09 22:37 

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.151002.1 | Last Updated 16 Dec 2008
Article Copyright 2008 by Aman Bhullar
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid