1

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.

  • please post the complete Xml log. But it looks like your server replies aith an error to the bind Iq. – Alex Dec 28 '15 at 10:14

1 Answers1

2

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.

Alex
  • 4,066
  • 2
  • 19
  • 21
  • Could you please point me to correct repository? The version I've used pretty much could be outdated, as I've simply used what was available through NuGet. – Aleksei Omelaienko Dec 28 '15 at 10:23
  • 1
    You can find the subversion repo here on this page: http://www.ag-software.net/agsxmpp-sdk/download/ – Alex Dec 28 '15 at 10:26