Not logged in. · Lost password · Register
Forum: MatriX RSS
when establishing a connection using the miniclient project
Avatar
Godboss #1
Member since Aug 2013 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: Object reference not set to an instance of an object on the miniclient project
Connect method being used:
private void cmdConnect_Click(object sender, EventArgs e)
        {
            xmppClient.SetUsername(txtUsername.Text);
            xmppClient.SetXmppDomain(txtServer.Text);
            xmppClient.SetResource("MyResource");
            xmppClient.Port = 5222;
            xmppClient.Password = txtPassword.Text;

            // BOSH exmaple
            //xmppClient.Transport = Matrix.Net.Transport.BOSH;
            //xmppClient.Uri = new System.Uri("http://matrix.ag-software.de/http-bind/");

            xmppClient.Status = "ready for chat";
            xmppClient.Show = Matrix.Xmpp.Show.chat;

            if (!String.IsNullOrEmpty(txtHost.Text))
                xmppClient.Hostname = txtHost.Text;

            // set settings
            _login.User = txtUsername.Text;
            _login.Server = txtServer.Text;
            _login.Password = txtPassword.Text;

            xmppClient.AutoPresence = true;
            xmppClient.AutoRoster = true;
            xmppClient.AutoReplyToPing = true;
           

            // you can also disable SRV lookups and specify the sever hostname manual
            //xmppClient.ResolveSrvRecords = false;
            //xmppClient.Hostname = "192.168.1.106";

            xmppClient.StartTls = true;
            xmppClient.Open();
        }

Full stack trace is:

   at #=q9IzI9_oYJIQmjpIAOX2NvOP46pRfE8uyC5T5X9r7H9A=.#=qT3ltHakiF3Jde3pHMzFCxT8ytKzGlpjx7JaAizsb4D0=(Mechanisms #=qv0CfZBXw09QzLixfQnQGyg==)
   at #=q9IzI9_oYJIQmjpIAOX2NvOP46pRfE8uyC5T5X9r7H9A=.#=q48yRhRDhFnXhG5A56n$k0w==(StreamFeatures #=qjJjkHn91C15DveuRg1M7HA==)
   at Matrix.Xmpp.Client.XmppClient.#=qF4_$fBb6evIfme$8S9muNSwIuustKEYldzkh44M32w0=(StreamFeatures #=qBRIOHmIkU1ZJQsRFHgK9EQ==)
   at Matrix.Xmpp.Client.XmppClient.XmppStreamParser_OnStreamElement(Object sender, StanzaEventArgs e)
   at Matrix.Xml.XmppStreamParser.#=qIaTyWcD8DNZvPNSbedJIii0RD1ILeZa5Sk87PgV4n8o=(XmppXElement #=qHI4LM0JybDjXQFVlcbxhUg==)

Stanzas exchanged:

SEND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="mx.jpmorgan.com" version="1.0" >
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" xml:lang="en" from="mx.jpmorgan.com" id="131B00002AA8" version="1.0" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
  <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
</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 xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="mx.jpmorgan.com" version="1.0" >
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" lang="en" from="mx.jpmorgan.com" id="131B00002AA8" version="1.0" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams" />


Any ideas on how to figure out what is going wrong?
Godboss
There are only two sure things in life: Death and my Victory...
This post was edited on 2013-08-09, 17:35 by Godboss.
Avatar
Alex #2
Member since Feb 2003 · 4296 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
your server sends an empty stream features tag:

  1. <stream:features xmlns:stream="http://etherx.jabber.org/streams" />

at this point your server must advertise the authentication mechanisms and other supported features in this tag.
So no idea why your server is not responding with them. Either its configured wrong, or you are connecting with wrong properties. XmppDomain property could be wrong.

Alex
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: MatriX RSS