0
votes

Helllo! Please help me to figure out why i can't login through BOSH via c# but can via Strophe. I use Matrix XMPP SDK. Here the code i use:

...

XmppClient xmpp = new XmppClient();
xmpp.SetXmppDomain("xmpptest.com");    

xmpp.Transport = Matrix.Net.Transport.BOSH;
xmpp.Uri = new System.Uri("http://xmpptest.com:5280");

xmpp.Username = "[email protected]";
xmpp.Password = "123456";

xmpp.OnBind += new EventHandler<JidEventArgs>(xmpp_OnBind);
xmpp.OnAuthError += new EventHandler<Matrix.Xmpp.Sasl.SaslEventArgs>(xmpp_OnAuthError);
xmpp.OnLogin += new EventHandler<Matrix.EventArgs>(xmpp_OnLogin);
xmpp.OnMessage += new EventHandler<MessageEventArgs>(xmpp_OnMessage);
xmpp.OnPrebind += new EventHandler<Matrix.Net.PrebindEventArgs>(xmpp_OnPrebind);
xmpp.OnBindError += new EventHandler<IqEventArgs>(xmpp_OnBindError);
xmpp.OnBind += new EventHandler<JidEventArgs>(xmpp_OnBind);
xmpp.OnPresence += new EventHandler<PresenceEventArgs>(xmpp_OnPresence);
xmpp.OnBeforeSasl += new EventHandler<Matrix.Xmpp.Sasl.SaslEventArgs>(xmpp_OnBeforeSasl);

xmpp.Prebind();

... But nothing is happening after Prebind method

2

2 Answers

0
votes

The username must be ksu only, not [email protected]. If it still fails a XML log would help.

0
votes

solved by installing ejabberd server instead of Tigase. The code above works well on it!