Subject: Object reference not set to an instance of an object
hi
i can connect to my openfire xmpp server from android smack api but for connecting to it in .net c# i chose agsXMPP but i got " Object reference not set to an instance of an object " error in onError method. the code info is this:
the xml send and recieve:
stackTrace:
i can connect to my openfire xmpp server from android smack api but for connecting to it in .net c# i chose agsXMPP but i got " Object reference not set to an instance of an object " error in onError method. the code info is this:
- xmpp.ConnectServer = "192.168.1.2";
- xmpp.Server = "hairedresser.chatserver";
- xmpp.Port = 5222;
- xmpp.AutoResolveConnectServer = false;
- xmpp.Username = "admin";
- xmpp.Password = "the pass";
- xmpp.Resource = "the resurse";
- xmpp.UseSSL = false;
- xmpp.Priority = 10;
- xmpp.SocketConnectionType = agsXMPP.net.SocketConnectionType.Direct;
- xmpp.UseStartTLS = true;
- xmpp.Open();
the xml send and recieve:
- "write: <stream:stream to='hairedresser.chatserver' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
- read: <stream:stream xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\" id=\"1hqrmju3aa\" xml:lang=\"en\" from=\"hairedresser.chatserver\" >
- read: <stream:features xmlns:stream=\"http://etherx.jabber.org/streams\"><starttls xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\" /><mechanisms xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\"><mechanism>EXTERNAL</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>PLAIN</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns=\"http://jabber.org/features/compress\"><method>zlib</method></compression><register xmlns=\"http://jabber.org/features/iq-register\" /></stream:features>
- write: <starttls xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\" />
- read: <proceed xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\" />
- write: <stream:stream to='hairedresser.chatserver' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
- read: <stream:stream xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\" id=\"1hqrmju3aa\" xml:lang=\"en\" from=\"hairedresser.chatserver\" >
- read: <stream:features xmlns:stream=\"http://etherx.jabber.org/streams\"><mechanisms xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\"><mechanism>EXTERNAL</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>SCRAM-SHA-1</mechanism><mechanism>PLAIN</mechanism><mechanism>CRAM-MD5</mechanism></mechanisms><compression xmlns=\"http://jabber.org/features/compress\"><method>zlib</method></compression><register xmlns=\"http://jabber.org/features/iq-register\" /></stream:features>
- write: <auth xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\" mechanism=\"DIGEST-MD5\" />
- read: <challenge xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">cmVhbG09ImhhaXJlZHJlc3Nlci5jaGF0c2VydmVyIixub25jZT0ieGtPSUhvU0dxWEx6dUVyK3dQUzd2QlFyYUZSSXRMaTdxK3c0T1NCYiIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>"
stackTrace:
at agsXMPP.sasl.DigestMD5.Step2.SupportsAuth(String qop)\r\n at agsXMPP.sasl.DigestMD5.Step2..ctor(Step1 step1, String username, String password, String server)\r\n at agsXMPP.sasl.DigestMD5.DigestMD5Mechanism.Parse(Node e)\r\n at agsXMPP.sasl.SaslHandler.OnStreamElement(Object sender, Node e)\r\n at agsXMPP.Xml.StreamHandler.Invoke(Object sender, Node e)\r\n at agsXMPP.Xml.StreamParser.DoRaiseOnStreamElement(Element el)
This post was edited 2 times, last on 2017-04-11, 16:35 by Alex.