Subject: Finesse Notification
I am new to MatriX. I want to get pidgin notifications/events in my C# .NET console application.
With this code implementation, I am getting exception M_xmppClient_OnError event (BOSH exception ,Message = "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.")
Any help with code implementation. Thank you
With this code implementation, I am getting exception M_xmppClient_OnError event (BOSH exception ,Message = "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.")
- m_xmppClient.Transport = Matrix.Net.Transport.Bosh;
- m_xmppClient.Hostname = "abc.com";
- m_xmppClient.Username = "user_name";
- m_xmppClient.Password = "password";
- m_xmppClient.Port = 5222;
- m_xmppClient.SetXmppDomain("https://abc.com");
- m_xmppClient.AutoRoster = true;
- m_xmppClient.AutoPresence = true;
- m_xmppClient.OnMessage += M_xmppClient_OnMessage;
- m_xmppClient.OnReceiveXml += M_xmppClient_OnReceiveXml;
- m_xmppClient.OnBind += M_xmppClient_OnBind;
- m_xmppClient.OnValidateCertificate += M_xmppClient_OnValidateCertificate;
- m_xmppClient.OnLogin += M_xmppClient_OnLogin;
- m_xmppClient.OnError += M_xmppClient_OnError;
- m_xmppClient.OnAuthError += M_xmppClient_OnAuthError;
- m_xmppClient.KeepAliveInterval = 60;
- m_xmppClient.Open();
- mgr.OnEvent += Mgr_OnEvent;
- private void M_xmppClient_OnAuthError(object sender, Matrix.Xmpp.Sasl.SaslEventArgs e)
- {
- Console.WriteLine(e.Exception);
- }
- private void M_xmppClient_OnError(object sender, Matrix.ExceptionEventArgs e)
- {
- Console.WriteLine(e.Exception);
- }
- private void M_xmppClient_OnLogin(object sender, Matrix.EventArgs e)
- {
- Console.WriteLine(e.State);
- }
- private void M_xmppClient_OnValidateCertificate(object sender, Matrix.CertificateEventArgs e)
- {
- e.AcceptCertificate = true;
- }
- private void M_xmppClient_OnBind(object sender, Matrix.JidEventArgs e)
- {
- Console.WriteLine("On bind: " + e.Jid);
- }
- private void Mgr_OnEvent(object sender, MessageEventArgs e)
- {
- Console.WriteLine(e.Message);
- }
- private void M_xmppClient_OnReceiveXml(object sender, Matrix.TextEventArgs e)
- {
- Console.WriteLine(e.Text + e.State);
- }
- private void M_xmppClient_OnMessage(object sender, MessageEventArgs e)
- {
- Console.WriteLine(e.Message.Value);
- Console.WriteLine(e.Message.Body);
- }
This post was edited on 2021-11-12, 08:55 by uzair2299.