Click here to Skip to main content
11,408,708 members (64,179 online)
Click here to Skip to main content

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

, 16 Dec 2008 CPOL
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

Comments and Discussions

QuestionHi.. Having chat.dll issue PinmemberMember 1126227325-Nov-14 3:15 
Questionsharing files or images in chat Pinmemberimran RP28-Sep-14 2:09 
AnswerRe: sharing files or images in chat PinmemberAman Bhullar13-Oct-14 4:27 
QuestionChat.dll PinmemberNico_Travassos26-Jun-14 5:01 
AnswerRe: Chat.dll PinmemberAman Bhullar8-Jul-14 6:33 
QuestionI Cant Use this :( Pinmembersara-98418-May-14 21:46 
AnswerRe: I Cant Use this :( PinmemberAman Bhullar20-May-14 0:55 
Questionclose the client windows PinmemberMember 105260156-Feb-14 8:40 
Questionchat notification PinmemberMember 896470922-Jun-13 3:41 
AnswerRe: chat notification PinmemberAman Bhullar26-Jun-13 6:50 
GeneralRe: chat notification PinmemberMember 896470926-Jun-13 11:31 
GeneralRe: chat notification PinmemberAman Bhullar1-Jul-13 5:50 
QuestionCan you transfer a chat to another operator PinmemberMember 100945125-Jun-13 7:30 
Questionproject doesnt have a good document Pinmemberamirsamani1-Jun-13 1:51 
QuestionPost a Java version Pinmember52215178218-Dec-12 20:25 
AnswerRe: Post a Java version PinmemberAman Bhullar23-Dec-12 22:52 
QuestionCan we change the brand name? PinmemberAmit D Rajput5-Nov-12 0:05 
AnswerRe: Can we change the brand name? PinmemberAman Bhullar10-Dec-12 0:00 
QuestionChat.DLL Pinmembersolgen31-Jul-12 16:34 
AnswerRe: Chat.DLL PinmemberAman Bhullar23-Aug-12 20:22 
AnswerRe: Chat.DLL Pinmemberamirsamani1-Jun-13 1:47 
GeneralRe: Chat.DLL PinmemberAman Bhullar6-Jun-13 2:37 
QuestionUsing this in my project Pinmembermrkeivan13-Feb-12 20:22 
AnswerRe: Using this in my project PinmemberAman Bhullar6-Jun-13 2:41 
QuestionMalicious code block PinmemberMember 84573795-Dec-11 12:02 
Questiondepartmen Pinmembertolgagim13-Nov-11 13: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 PinmemberAman Bhullar21-Nov-11 7:17 
Questioncan you upload class file also. instead of dll Pinmemberktoby16-Jul-11 11:18 
GeneralHi Pinmemberdavidcandia30-Apr-11 12:36 
GeneralRe: Hi PinmemberAman Bhullar17-May-11 7:07 
GeneralMy vote of 5 Pinmemberbahmandb29-Apr-11 10:26 
Generalfull solution Pinmemberamr rabie17-Apr-11 13:04 
GeneralRe: full solution PinmemberAman Bhullar25-Apr-11 7:00 
GeneralRegarding the flow of this application PinmemberMember 390017229-Dec-10 4:14 
GeneralRe: Regarding the flow of this application PinmemberRohit_kakria3-Feb-11 2:12 
GeneralRe: Regarding the flow of this application PinmemberAman Bhullar3-Feb-11 5:34 
GeneralMy vote of 4 PinmemberPablo Castillo16-Aug-10 9:32 
GeneralSecurity Awareness Pinmemberbokohut3-Dec-09 7:44 
GeneralRe: Security Awareness Pinmembertheripevessel14-Jan-10 9:40 
QuestionNew Improvements? Pinmemberrodusa200729-Sep-09 19:09 
AnswerRe: New Improvements? PinmemberAman Bhullar30-Sep-09 6:24 
GeneralNeed to implement chat on project PinmemberMasakhane10-Sep-09 1:04 
GeneralRe: Need to implement chat on project PinmemberAman Bhullar10-Sep-09 7:11 
QuestionWhat if u want to chat with ur friends Pinmembervaah24-Jul-09 9:05 
AnswerRe: What if u want to chat with ur friends PinmemberAman Bhullar27-Jul-09 6:30 
GeneralRe: What if u want to chat with ur friends Pinmembervaah27-Jul-09 6:35 
GeneralRe: What if u want to chat with ur friends PinmemberAman Bhullar28-Jul-09 6:41 
QuestionMessage is showing arlivesupport PinmemberRohit_kakria26-Jun-09 3:25 
AnswerRe: Message is showing arlivesupport PinmemberRohit_kakria26-Jun-09 23:37 
GeneralRe: Message is showing arlivesupport PinmemberAman Bhullar29-Jun-09 6:54 

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
Web04 | 2.8.150414.5 | Last Updated 16 Dec 2008
Article Copyright 2008 by Aman Bhullar
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid