Not logged in. · Lost password · Register
Forum: agsXMPP RSS
eqi #1
Member since Feb 2008 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: Can not send to gtalk in page
I tested the send message from the SDK package and it did not working on both my home computer and office computer.
I created a simple page and added a button to invoke the event. It simply not working. Here is the c# code.

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using agsXMPP;
using agsXMPP.protocol.client;
using agsXMPP.Collections;
using System.Threading;

public partial class Chat : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)
    protected void Button1_Click(object sender, EventArgs e)
        XmppClientConnection xmpp = new XmppClientConnection();
        xmpp.Server = "";
        xmpp.Username = "gmail account";
        xmpp.Password = "gamil password";
        xmpp.AutoResolveConnectServer = true;
        xmpp.SocketConnectionType =;
        xmpp.UseStartTLS = true;
        agsXMPP.Jid JID = new Jid("");
        agsXMPP.protocol.client.Message msg = new agsXMPP.protocol.client.Message();
        msg.Type =;
        msg.To = JID;
        msg.Body = "Hello " + DateTime.Now.ToString();
        xmpp.OnLogin += delegate(object o) { xmpp.Send(msg); };


This post was edited on 2008-02-26, 19:58 by eqi.
Alex #2
Member since Feb 2003 · 4296 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Can you subscribe to the events OnReadXml and OnWriteXml and post your debug XML?
Does this code work for you when you put it into a windows forms or console application?

Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS