Wednesday, March 20, 2013

Facebook/Gmail Style ASP.NET JQuery Ajax Chat Control

88 comments

Like my Chat Control? Rate it at HotScripts > Hot Scripts


























ASP.NET Jquery Ajax Chat Control / DG2 Chat Control 


This is the control on which i have spend nearly 4 months from my busy schedule. Hope those who need this will like it.
Releasing the Control in its first Beta Version.

ASP.NET Jquery Ajax Chat Control is built on .Net Framework 3.5. It uses Jquery 1.8 library and Jquery UI 1.9 library.
Tested to work on IE7+, Google Chrome, Firefox, Safari.

Features:

  • Easy to Integrate as its a Control just drag and drop and provide necessary settings.
  • Good Looks, Lots of Themes, even custom Themes can be designed as it uses JQuery UI for Theming.
  • MS SQL and MySQL Database support
  • Rich Ajax Interface.
  • Avatar / Picture Support.
  • Profile Link Support.
  • Search Users.
  • Animated Smileys.
  • Animated User Typing Notification.
  • Three Status modes Invisible,Offline and Online.
  • Visual Notification.
  • Alert Notification.
  • Error Notification.
  • Good Response Time.
  • and much more.......

Like my Chat Control? Rate it at HotScripts > Hot Scripts

Demo:
  • Try to Open Below Links in different Browsers. Unexpected result may occur due to usage by different users trying the demo.
  • Demo1
  • Demo2
  • Demo3
Download:
  • DG.Square.AjaxChat.Control v1.1
  • DG.Square.AjaxChat.Control v1.0
  • Update 5th Dec 2013
  • Currently disabled as new version development is in progress.
  • I have stopped this project since May 2013 but due to lots of emails and 100+ comments pending for approval i have decided to release version 2.0.
  • Version 2.0 will be released in Mid or last week of December 2013.

Update 24 Mar 2013:

For  those who are able to run this in local host but not on webserver, try to add below code in your web.config file.

<add name="DG2AjaxChat" path="*.ajaxchat" verb="*" type="DG.Square.ASP.NET.Ajax.ChatControl.AjaxHandler" />

under this:
<system.webServer>
<handlers>

</handlers>
</system.webServer>

you can check my sample projects webconfig files <system.webServer><handlers> tag


Update 21 Apr 2013:


  • v1.1 Released.
  • Please check sample projects connection string section in web.config file for mysql connection string.
  • connection string should have providername.
  • Let me know of any queries here or you can email me. my email id can be found from my profile page.


Changelog:

v 1.1
  • added support for jquery multiple versions compatibility.
  • added MySQL Database support.
  • added Auto logout if user don't logout.
  • Added support for InProc, StateServer and SqlStateServer Session Mode.
  • now compatible with .Net framework 2.0.
  • added new Theme "DGTheme".
v1.0
  • Initial Release.


Final Notes:

Next Version will include Bug fixes reported or found.
Let me know any Queries or Report Bugs with screenshot and details. Have a Nice Time. :)




Like my Chat Control? Rate it at HotScripts > Hot Scripts

88 comments:

  1. Awesome Chat control. i really liked the looks. thanks was waiting for it so eagerly. you made my day hardcoderz. Thanks.

    ReplyDelete
  2. hey HardCoder it was really aswesome.. but i see the users even if they log off from the system..

    ReplyDelete
    Replies
    1. yes i also found that issue. it appears only when user dont logout by using logout button. i will be fixing it shortly.

      Delete
  3. great control. and moreover its free for commercial and personal use. super-like for this control and you off-course.

    ReplyDelete
  4. This is what i was looking to integrate in my social networking site. thanks a lot.

    ReplyDelete
  5. it is not working. It works in local server, when i upload it to application server, it shows error.
    Detailed Error Information:
    Module IIS Web Core
    Notification MapRequestHandler
    Handler StaticFile
    Error Code 0x80070002
    Requested URL http://domain.com/OnePhoneLatest/.ajaxchat?call=startsession&_=1364120407835
    Physical Path d:\DZHosts\LocalUser\kk\domain.com\OnePhoneLatest\.ajaxchat
    Logon Method Forms
    Logon User AAA

    ReplyDelete
    Replies
    1. I think so http handler info for web server must be missing in webconfig file.

      try to add below code in your web.config file

      <add name="DG2AjaxChat" path="*.ajaxchat" verb="*" type="DG.Square.ASP.NET.Ajax.ChatControl.AjaxHandler" />

      under this:
      <system.webServer>
      <handlers>
      above code must be added under this tag.
      </handlers>
      </system.webServer>

      you can check my sample projects webconfig files <system.webServer><handlers> tag

      Let me know if the issue solved.

      Delete
    2. I am getting same issue- its working in my local machine but not working in production(webserver) even i am adding above mentioned handle in web.config. Please see the error message below...

      ---------------------------
      Message from webpage
      ---------------------------
      Error Occured: Internal Server Error

      IIS 7.5 Detailed Error - 500.21 - Internal Server Error
      style type="text/css"

      body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;background:#CBE1EF;}
      code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;}
      .config_source code{font-size:.8em;color:#000000;}
      pre{margin:0;font-size:1.4em;word-wrap:break-word;}
      ul,ol{margin:10px 0 10px 40px;}
      ul.first,ol.first{margin-top:5px;}
      fieldset{padding:0 15px 10px 15px;}
      .summary-container fieldset{padding-bottom:5px;margin-top:4px;}
      legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;}
      legend{color:#333333;padding:4px 15px 4px 10px;margin:4px 0 8px -12px;_margin-top:0px;
      border-top:1px solid #EDEDED;border-left:1px solid #EDEDED;border-right:1px solid #969696;
      border-bottom:1px solid #969696;background:#E7ECF0;font-weight:bold;font-size:1em;}
      a:link,a:visited{color:#007EFF;font-weight:bold;}
      a:hover{text-decoration:none;}
      h1{font-size:2.4em;margin:0;color:#FFF;}
      h2{font-size:1.7em;margin:0;color:#CC0000;}
      h3{font-size:1.4em;margin:10px 0 0 0;color:#CC0000;}
      h4{font-size:1.2em;margin:10px 0 5px 0;
      }#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS",Verdana,sans-serif;
      color:#FFF;background-color:#5C87B2;
      }#content{margin:0 0 0 2%;position:relative;}
      .summary-container,.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
      .config_source{background:#fff5c4;}
      .content-container p{margin:0 0 10px 0;
      }#details-left{width:35%;float:left;margin-right:2%;
      }#details-right{width:63%;float:left;overflow:hidden;
      }#server_version{width:96%;_height:1px;min-height:1px;margin:0 0 5px 0;padding:11px 2% 8px 2%;color:#FFFFFF;
      background-color:#5A7FA5;border-bottom:1px solid…
      ---------------------------
      OK
      ---------------------------

      Delete
    3. Send me your web.config file to my email id. you can get my email id from my bloggers profile link.

      Delete
  6. I also had the same issue thanks for the update. its now working fine.

    ReplyDelete
  7. I was looking for a free script and found this, Nice control. keep up the good work.

    ReplyDelete
  8. hey hardcoder can i get the source code for the dll i just want to look it to it.
    I promis i dont use it for any commercial purpose .. i just wanaa learn..btw im a student so i cant even use it for commercial purpose..
    please mail me the code.. my id is
    mellalwayswill@gmail.com

    ReplyDelete
    Replies
    1. sorry man. currently not in a situation to release the code. may be in future. The project can be used for commercial or personal projects.

      Delete
    2. its ok..hardcoder please send me when ever you feel to release the code.. thanks.

      Delete
  9. Hi, How can I run your Sample Code?

    ReplyDelete
    Replies
    1. You can run it with Visual Studio 2008 or greater. from File menu of Visual Studio select open website and browse to the sample project folder and click open.
      you need to execute sql scripts provided in SQL Server.
      And modify connectionstring in web.config file of project to point it to your Database.

      Delete
  10. Excellent control with great look. Can this support MySql as well? Most of my web applications are integrated with mysql database and hence can you please confirm whether this works with mysql?

    ReplyDelete
    Replies
    1. Hi Kiran,
      Current version only works with MS SQL Server and MS Access. Im currently working on updating it to work with MySQL too. Hope so will be releasing this version by next week.

      Delete
  11. Hi Hardcoderz, the code is working fine but i have found one issue,
    i see the users even if they log off from the system. i think this is big issue, apart from this every thing is excellent. great work.

    can pls find a solution for this issue.

    ReplyDelete
    Replies
    1. I have fixed this issue. will be releasing the new updated version by next week.

      Delete
    2. Great... Eagerly waiting for next build, thank you for your reply.
      may i know what r the new changes are coming in new build.

      Delete
    3. 1)When User Session ends Make user appear offline if user don't click logout button and leaves the site. As current version make user appear offline only if he clicks logout but if he leaves without clicking logout he still appears online.
      2)MYSQL Database support.
      3)Multiple Session state support like InProc, StateServer and SqlServer state, as current version only supports InProc Session Mode.

      Delete
  12. when i write this code in web.config
    shows error
    Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode.

    i need use this code

    ReplyDelete
    Replies
    1. This is occurring becoz you must be using StateServer Session Mode. Current version only supports InProc Session Mode. Next version im releasing next week supports all three modes InProc, StateServer and SqlServer.

      Delete
  13. hello,
    this control seems great, but...will it work on ASP.NET 2.0?

    ReplyDelete
    Replies
    1. No current version wont work on .Net 2.0 as i have used LINQ. Im trying to make it compatible with .Net 2.0 by using LinqBridge, If successful will release it for .Net 2.0 also.

      Delete
  14. I'm trying to run a chat on ASP.NET MVC.
    Add links to Web.config



    When the application starts, I get the message:

    The resource cannot be found.
    HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
    Requested URL: /. ajaxchat

    What could be the problem?

    Thank you.

    ReplyDelete
    Replies
    1. Chat Control is an Asp.net server control which is not supported by MVC. but im trying to make it work with MVC too. if successful then will release the new version.

      Delete
    2. I have the same issue. I uploaded it on my live server and it throwing the same error "the resource you are looking for cannot be displayed"
      I am not running it on MVC its a normal ASP.NET website.
      Works well on localhost

      Delete
    3. Ufazal are you using .Net 4.0 for your site ? if yes then please remove "" this line from your web.config's -> and try again. Please let me know if this solves your issue or not.

      Delete
  15. how to remove Powered By DG Square Chat ????????????

    ReplyDelete
    Replies
    1. pls sir i want to remove Powered By DG Square Chat

      Delete
    2. Please give my project also some exposure. its the only facebook / gmail style chat control that is free.

      Have you seen zopim chat they charge heavily and also they have their powered by tag in there chat script.

      Delete
    3. That's the very least way you could be grateful to Hardcoderz for providing such an awesome control FOR FREE! It's like a courtesy call, you know?

      Delete
  16. i had a problem when my website have Jquery and scripts as all my jquery not working and when i set chatbox.enablejquery=false the chat control not working while clicking friend or minimizing

    ReplyDelete
    Replies
    1. What version of jquery you are using ? Im using v1.8.

      Delete
  17. Hi Hardcoderz,
    I have been checking out your cool project. I'm interested to know what technology you are using behind the scene:
    1) WCF web services.
    2) ASMX web services.
    3) Controls from the AJAX framework provided by Microsoft (like UpdatePanel)
    4) External libraries like SignalR
    5) Some other unmentioned technology.

    Thank you for the clarification.

    ReplyDelete
  18. how do i can change the design part in Dg Square chat

    ReplyDelete
    Replies
    1. you can create custom Themes by using Jquery UI Theme builder but design can't be changed as all css files are inside, the control.

      Delete
  19. Awesome control! Thanks a whole lot! Keep it up, man!

    ReplyDelete
  20. why you didn't upload the source code of dll so we can make any changes in behavior if we like.

    ReplyDelete
    Replies
    1. Becoz. I'm getting paid for creating custom versions of this chat control.

      Delete
  21. good work HARDCODER it will be great if you give an option to give our own images for emotions..and typing image.and idle status will help a lot

    ReplyDelete
  22. Hi. This is a great control to use.
    I have a small issue. The UserID value is a varchar but if I put userID other than a numeric value, it misbehaves. Can you please make it work with varchar please ?

    ReplyDelete
    Replies
    1. The userID value is assigned to chatbox div id. for example if userID is 1 then his chat window div id is chatwindow_ + userID i.e chatwindow_1. it supports alphanumeric values. but not special characters.

      Delete
    2. ok cool.. on more issue i saw is :
      Even though I turn the chat offline (From the top left menu), I still receive messages from people. (if someone send me an IM even if i am offline)
      will that be fixed in new version ?
      Also let me know if I am wrong about this.

      Delete
    3. it doesn't have separate message tab like facebook where it shows message in inbox if u r offline. thats why my chat control shows you message even if you are offline.

      Delete
  23. how to added MySQL Database support.

    ReplyDelete
    Replies
    1. the version i'm hopefully releasing tomorrow has MySQL Db support.

      Delete
  24. that was a hell of program. can i have a copy of your codes? i badly needed it for our project. ambuccat92@gmail.com im looking forward onto it.a big big thanks in advance! :)

    ReplyDelete
  25. Hi Hardcoderz

    Have your released new version. i am waiting for this solution.

    When User Session ends Make user appear offline if user don't click logout button and leaves the site. As current version make user appear offline only if he clicks logout but if he leaves without clicking logout he still appears online.

    ReplyDelete
  26. What´s up with the new version?..

    ReplyDelete
  27. hey hardcoder it was really a great control.. but it will be much use full if we get idle status and custom status messages too....

    ReplyDelete
  28. thank you for new release 1.1

    i needed make user appear offline.

    ReplyDelete
  29. I can not add a control in to the ToolBox. This is a message

    There are no component in 'D:\myProject\DG.Square.AjaxChat.Control v1.1 - Full\Bin\.Net3.5+\DG.Square.AjaxChat.Control.dll' that can be place on the toolbox

    I use vs2012 Express for web

    ReplyDelete
    Replies
    1. OH! i will rebuild and upload it ASAP.

      Delete
    2. Why i can't add a control

      Delete
    3. Oh, it i can do this. Only drag dg....dll and pass in to toolBox.
      Thank you.

      Delete
  30. there is any possibility to remove Powered By DG Square Chat?

    thanks

    ReplyDelete
    Replies
    1. Lots of user are asking this question. i will be thinking something for this now.

      Delete
  31. Hi

    I am getting error when i run the application,
    error i am getting in this line

    cb.startSession(id, uname.Text, avatar.Text);

    Error name : Instance failure.

    what could be problem.

    ReplyDelete
    Replies
    1. please check your connection string as this error occurs in SQL server. when connection string contains extra "\".

      Delete
  32. Hi HardcoderZ

    I have used your version 1.1 it was assume but, this issue is still exist.

    If user suddenly close the browser, for other users still it is showing in online. If I click logout then it works fine.




    ReplyDelete
    Replies
    1. There seems some problem with the built dll. its having some some issue. the control don't even show in toolbox. I'm currently on vacation i will be returning on 10 May 2013, i will recompile and upload the dll when i return. sorry for inconvenience.

      Delete
  33. Hi. The Chat control is awesome.
    One major issue i faced.
    Even if I put my self in offline mode(the chatr control minimizes and i expect no more messages coming now), I receive the messages sent by other people to me. And they pop-up in a new window like normal.

    Can you see whats happening here ?

    ReplyDelete
    Replies
    1. i think so ufazal i answered this question when you asked it on April 16, 2013 at 1:54 PM. but this is also on my list i will be done in 1.2 release.

      Delete
  34. Hi

    Amazing control . Does it support add multiple users in one window. Chat with 3 people or more

    ReplyDelete
    Replies
    1. Thanks. Unfortunately currently not. i'm planning this for version 1.2 or 1.3.

      Delete
  35. Hey...
    You done a great job...i am really inspired...

    ReplyDelete
  36. Is this software free to use? Or do we need to pay something it?

    ReplyDelete
    Replies
    1. Its free for both personal or commercial purpose but make sure the powered by DG SQuare Chat link is not removed.

      Delete
  37. Thanks a ton for this brilliant piece of work !

    I have integrated your chat application in my college project, but there is one problem I'm facing. I'm giving you the details of the problem :

    1.I have logged into the system
    2.I have opened multiple chat sessions with other users (online users)
    3.All of a sudden I decide to go offline, now when I do so, the person(s) chatting with me see my status changed to offline (thats ok)
    4.But all the chat windows which I opened are still active and I can still chat. i.e the messages can come as well as GO from side through those windows.

    Technically all the chat windows I opened should get closed at once when I change my status to offline, assuming that the application shuts down from my side at that instance.

    Since you are not providing the source code, (which I gracefully appreciate) I would be extremely grateful if you provide any help in this regard.

    Regards,
    Rizwi

    ReplyDelete
  38. This comment has been removed by the author.

    ReplyDelete
  39. Hi, i have aspx into directory in the root and call this aspx in the master page in the root but the themes not found need put directory themes in all folders ??
    ThanK U

    ReplyDelete
  40. Hi excelent control. When send message in the chat the date is ok but in the recived is bad NaN/NaN/0NaN.

    ReplyDelete