Not logged in. · Lost password · Register
Forum: agsXMPP RSS
(can't send messages after that)
Avatar
Toine de Boer #1
Member since Aug 2011 · 3 posts
Group memberships: Members
Show profile · Link to this post
Subject: MiniClient; stuck at OnXmppConnectionStateChanged: Binding
Hello,

I'm trying the MiniClient C# (VS2008 version converted to VS2010).
(this in combination with a OpenFire server, that works/tested with Spark)

At this moment I have a problem with sending a message, and get
<error type="auth" code="401"><not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /></error>

I think the client hasn't been authenticated yet, so I checked but it seems to get stuck at 'Binding'
OnXmppConnectionStateChanged: Connecting
OnXmppConnectionStateChanged: Connected
OnXmppConnectionStateChanged: Securing
OnXmppConnectionStateChanged: Authenticating
OnXmppConnectionStateChanged: Authenticated
OnXmppConnectionStateChanged: Binding

(it doesn't even passes the OnLogin event)

At this moment I don't know where to look anymore, any ideas??????

PS: the only thing I changed in the MiniClient code is: (otherwise the Authentication won't work, first I need to get the chat to work)
        private void XmppCon_OnSaslStart(object sender, SaslEventArgs args)
        {
            // You can define the SASL mechanism here when needed, or implement your own SASL mechanisms
            // for authentication

            // Changed by Tony
            args.Auto = false;
            args.Mechanism = agsXMPP.protocol.sasl.Mechanism.GetMechanismName(agsXMPP.protocol.sasl.MechanismType.PLAIN);           
           
            //args.Auto = false;
            //args.Mechanism = agsXMPP.protocol.sasl.Mechanism.GetMechanismName(agsXMPP.protocol.sasl.MechanismType.ANONYMOUS);
        }

The XML output:

SEND: <stream:stream to='freeku.no-ip.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="xmpp" xml:lang="en" version="1.0" id="5b651844" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth" /><register xmlns="http://jabber.org/features/iq-register" /></stream:features>
SEND: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
RECV: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
SEND: <stream:stream to='freeku.no-ip.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="xmpp" xml:lang="en" version="1.0" id="5b651844" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism><mechanism>ANONYMOUS</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><auth xmlns="http://jabber.org/features/iq-auth" /><register xmlns="http://jabber.org/features/iq-register" /></stream:features>
SEND: <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">XXX</auth>
RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
SEND: <stream:stream to='freeku.no-ip.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="xmpp" xml:lang="en" version="1.0" id="5b651844" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams"><compression xmlns="http://jabber.org/features/compress"><method>zlib</method></compression><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></stream:features>
SEND: <iq id="agsXMPP_1" type="set" to="freeku.no-ip.org"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>MiniClient</resource></bind></iq>
RECV: <iq xmlns="jabber:client" type="error" from="freeku.no-ip.org" to="xmpp/5b651844" id="agsXMPP_1"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>MiniClient</resource></bind><error type="modify" code="400"><bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /></error></iq>
This post was edited on 2012-12-14, 12:12 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4307 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
SEND: <stream:stream to='freeku.no-ip.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="xmpp" xml:lang="en" version="1.0" id="5b651844" >

your server is configured to the xmpp domain "xmpp". But you use "freeku.no-ip.org". This is why authentication also fails with all other mechanisms than plain. Please fix your server setup.

Alex
Avatar
Toine de Boer #3
Member since Aug 2011 · 3 posts
Group memberships: Members
Show profile · Link to this post
Thanks for the reply,

The server is not under my control, the owner is gona change/fix it toninght.

I will let you know if this fixes the/any problems.
Avatar
Toine de Boer #4
Member since Aug 2011 · 3 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #2
Thanks, it works like a charm! :-)

Now up to my own code!
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