Not logged in. · Lost password · Register
Forum: agsXMPP RSS
rohans84 #1
Member since Jun 2008 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: cannot talk via gtalk id
Hi all,
 I have developed a simple console application using agsXMPP library. -
            XmppClientConnection xmpp = new XmppClientConnection();
            xmpp.Server = "";
            xmpp.ConnectServer = "";
            xmpp.AutoResolveConnectServer = true;
            xmpp.Username = "user id":;
            xmpp.Password = "Password";
            xmpp.Resource = null;
            xmpp.Priority = 10;
            xmpp.Port = 5222;
            xmpp.UseSSL = true;
            xmpp.SocketConnectionType =;
            xmpp.UseStartTLS = true;

I am able to open the connection - authenticated status is true

I also get the list of available contacts. but then during the event - OnPresence, I  get this exception -

Socket Exception: Unable to read data from the transport connection: Cannot access a disposed object.
Object name: 'System.Net.Sockets.Socket'..
The author has attached one file to this post:
Program.cs 6.4 kBytes
You have no permission to open this file.
Alex #2
Member since Feb 2003 · 4296 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
There are some errors in your code. I don't know what exactly is the problem, but I think it's the order you process the events, or your console app is terminating to early.

  • Please study the examples which ship with the SDK. There is a console and winforms example.
  • Setup all your event handlers before calling xmppCon.Open()
  • If you request the roster on each login, send your own presence in OnRosterEnd.

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