Subject: Object reference not set to an instance of an object on the miniclient project
Connect method being used:
Full stack trace is:
Stanzas exchanged:
Any ideas on how to figure out what is going wrong?
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();
}
{
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...
There are only two sure things in life: Death and my Victory...
This post was edited on 2013-08-09, 18:35 by Godboss.