0

I am trying to connect my .net application to xmpp server for events through Jabber-Net. I am not able subscribe for events and keep getting error.

I used matrix and able to connect to the XMPP server. I cam not use matrix for my project there for I need to get it working through Jabber-Net.

I compared both the libraries send & receive message and following is the difference:

Matrix:

SEND:
<iq id="MX_1" type="set" xmlns="jabber:client"> <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>MatriX</resource>  </bind></iq>

RECV:
<iq type="result" id="MX_1" to="server9.host9.com/4bbc160" xmlns="jabber:client"> <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>3002@server9.host9.com/MatriX</jid></bind></iq>

Jabber-Net

Send:
<iq id="jn_1" type="set" to="XMPP_SERVER_IP"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>Jabbernet</resource></bind></iq>

RECV
<iq type="error" id="JN_1" from=" XMPP_SERVER_IP " to="server9.host9.com/e5c0c0b8"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>Jabber.Net</resource></bind><error code="400" type="modify"><bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>

I know there is slight change in two request. Any idea how can I correct it in Jabber-Net

user2692032
  • 771
  • 7
  • 26

1 Answers1

1

You likely got JabberClient.NetworkHost and JabberClient.Server switched. You shouldn't need to set NetworkHost unless your DNS setup is bad.

Joe Hildebrand
  • 10,354
  • 2
  • 38
  • 48