XmppClientConnection OnLogin event never firing after OnIq

453 Views Asked by At

Here's my setup:

Jid jid = new Jid ( "*******@jabber.ua" );
XmppClientConnection connection = new XmppClientConnection ( jid.Server );
connection.Open ( jid.User, "**********" );

After calling connection.Open, everything is working nicely, i.e. connection.XmppConnectionState is changing from Connecting to Connected to Securing to Authenticating to Authenticated to Binding. Between connection.XmppConnectionState becoming Securing and Authenticating there's an ArgumentNullException thrown in mscorlib.dll according to output, but it shows nowhere else. After connection.XmppConnectionState hitting Binding, the following exchange happens:

<iq id="agsXMPP_1" 
    type="set" 
    to="jabber.ua">
    <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
        <resource>agsXMPP</resource>
    </bind>
</iq>

<iq xmlns="jabber:client" 
    id="agsXMPP_1" 
    type="error" 
    from="jabber.ua">
    <error type="cancel">
        <service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
    </error>
</iq>

And after being passed into connection.OnIq event, everything stops happening, i.e. no XmppClientConnection events firing, no exceptions raised, nothing at all happens until closing the connection.

1

There are 1 best solutions below

2
Alex On BEST ANSWER

it looks like you run a Prosody server. Prosody returns this error when the BindIq gets sent with a to attribute. This problem was fixed a while ago in agsXMPP. Please use the latest code from the source repository.