Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
msathya03 #1
Member since Mar 2009 · 12 posts
Group memberships: Members
Show profile · Link to this post
Subject: Google Talk application is not working on Windows mobile6
Hello sir,
    I developed a Google Talk application using agsXmpp lib. I tested on both emulator and Windows mobile. It was working fine. But today I tried to sign in in my Windows mobile6.0.  But I can't able to sign in. But the application is working fine on my Emulator. I surprised why suddenly is not wworking today on my mobile. (Yestrday evening also working fine on device. Same cab file is not working today). I tried nearly 10 times. But no success.

I am getting XML debug like this:
  1. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  2. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="B11AAF5248DEC3FF" >
  3. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required /></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
  4. On Write XML ------- SEND:<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  5. On Read XML ------- RECV:<proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  6. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  7. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="C176CEEF6DA73773" >
  8. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
  9. On Write XML ------- SEND:<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">XXX</auth>
after that i am getting OnClose()..

Pls help me to solve this problem....
Very urgent..


Thanks,
M.Sathya.
This post was edited 2 times, last on 2018-03-22, 10:35 by Alex.
Avatar
msathya03 #2
Member since Mar 2009 · 12 posts
Group memberships: Members
Show profile · Link to this post
Hi I tried 4 times . But i couldn't get the connection. Internet conection is working fine on Mobile. I tried "talkount" IM application on my WM 6.0. It is also working fine. But my Gtalk application is not working :(

Here I am Placing the XML debug for ur reference:

First time:

  1. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  2. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="C2ED4C131138C054" >
  3. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required /></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
  4. On Write XML ------- SEND:<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  5. On Read XML ------- RECV:<proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
OnError...OnClose..

Second time:

IPV4
  1. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  2. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="39DE8A48C3B0DF55" >
  3. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required /></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
  4. On Write XML ------- SEND:<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  5. On Read XML ------- RECV:<proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  6. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  7. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="0569C1926CFF9F57" >
  8. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
  9. On Write XML ------- SEND:<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">XXX</auth>
  10. The thread 0xf6d43de6 has exited with code 0 (0x0).
  11. On Read XML ------- RECV:<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
  12. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
OnClose...

Third Time:

IPV4
  1. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  2. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="B2BE78013365212E" >
  3. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required /></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
  4. On Write XML ------- SEND:<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  5. On Read XML ------- RECV:<proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  6. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  7. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="BF43B60B5AAF0B9B" >
  8. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
  9. On Write XML ------- SEND:<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">XXX</auth>
  10. On Read XML ------- RECV:<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
  11. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  12. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="4B8DAEB1EF7DDCF5" >
  13. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></stream:features>
  14. On Write XML ------- SEND:<iq id="agsXMPP_1" type="set" to="gmail.com"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>agsXMPP</resource></bind></iq>
A first chance exception of type 'System.IO.EndOfStreamException' occurred in crypto.dll
A first chance exception of type 'System.IO.IOException' occurred in crypto.dll
OnClose...

Fourth Time:

IPV4
  1. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  2. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="F26452B209976D71" >
  3. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required /></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
  4. On Write XML ------- SEND:<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  5. On Read XML ------- RECV:<proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  6. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  7. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="B1B0B337347806D4" >
  8. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
  9. On Write XML ------- SEND:<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">XXX</auth>
  10. On Read XML ------- RECV:<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
  11. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
A first chance exception of type 'System.IO.EndOfStreamException' occurred in crypto.dll
A first chance exception of type 'System.IO.IOException' occurred in crypto.dll
OnClose..


Pls help Me :(
This post was edited 3 times, last on 2018-03-22, 10:36 by Alex.
Avatar
msathya03 #3
Member since Mar 2009 · 12 posts
Group memberships: Members
Show profile · Link to this post
Most of time am getting error after
"SEND:<iq id="agsXMPP_1" type="set" to="gmail.com"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>agsXMPP</resource></bind></iq>" after this line on WM6.0

Pls help me
Avatar
Alex #4
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
there seems to be a problem with the crypto dll. Can you try to set UseStartTls = false on your XmppClientConnection object?

Alex
Avatar
msathya03 #5
Member since Mar 2009 · 12 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

      As u said there is some problem in crypto.dll i think. I tried to set UseStartTls = false. But I am getting the following error:

  1. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  2. 'testGTalk.exe' (Managed): Loaded 'C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\Debugger\BCL\System.Xml.dll'
  3. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="3416B9AD9074040C" >
  4. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required /></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
'testGTalk.exe' (Managed): Loaded 'System.SR.dll'
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.dll
OnError: Onclose:
:(

If possible Could u pls send me the updated and working crypto.dll file or could u pls tell from where can I get the latest version of agsXmpp and crypto.dll files.
Pls help me.


Regards,
M.Sathya.
This post was edited on 2018-03-22, 10:36 by Alex.
Avatar
msathya03 #6
Member since Mar 2009 · 12 posts
Group memberships: Members
Show profile · Link to this post
HI here I am sending the code. Pls let u check i did any wrong

  1. public partial class Form1 : Form
  2.     {
  3.         XmppClientConnection xmppCon = new XmppClientConnection();
  4.         public Form1()
  5.         {
  6.             InitializeComponent();
  7.             InitXmppSettings();
  8.  
  9.             //Events
  10.             xmppCon.OnAgentEnd += new ObjectHandler(xmppCon_OnAgentEnd);
  11.             //xmppCon.OnAgentItem += new XmppClientConnection.AgentHandler(xmppCon_OnAgentItem);
  12.             xmppCon.OnAgentStart += new ObjectHandler(xmppCon_OnAgentStart);
  13.             xmppCon.OnWriteXml += new XmlHandler(xmppCon_OnWriteXml);
  14.             xmppCon.OnReadXml += new XmlHandler(xmppCon_OnReadXml);
  15.  
  16.             xmppCon.OnAuthError += new XmppElementHandler(xmppCon_OnAuthError);
  17.             xmppCon.OnClose += new ObjectHandler(xmppCon_OnClose);
  18.             xmppCon.OnError += new ErrorHandler(xmppCon_OnError);
  19.             xmppCon.OnIq += new IqHandler(xmppCon_OnIq);
  20.             xmppCon.OnLogin += new ObjectHandler(xmppCon_OnLogin);
  21.             xmppCon.OnMessage += new MessageHandler(xmppCon_OnMessage);
  22.             xmppCon.OnPresence += new PresenceHandler(xmppCon_OnPresence);
  23.             xmppCon.OnRosterEnd += new ObjectHandler(xmppCon_OnRosterEnd);
  24.             xmppCon.OnRosterItem += new XmppClientConnection.RosterHandler(xmppCon_OnRosterItem);
  25.             xmppCon.OnRosterStart += new ObjectHandler(xmppCon_OnRosterStart);
  26.  
  27.             xmppCon.ClientSocket.OnReceive += new agsXMPP.net.BaseSocket.OnSocketDataHandler(ClientSocket_OnReceive);
  28.             xmppCon.ClientSocket.OnSend += new agsXMPP.net.BaseSocket.OnSocketDataHandler(ClientSocket_OnSend);
  29.         }
  30.        private void InitXmppSettings()
  31.        {
  32.            string username = "username@gmail.com";
  33.            Jid jid = new Jid(username);
  34.            xmppCon.Server = jid.Server;
  35.            xmppCon.Username = jid.User;
  36.            xmppCon.Password = "password";
  37.            xmppCon.Priority = 10;
  38.            xmppCon.AutoResolveConnectServer = false;
  39.            xmppCon.KeepAlive = false;
  40.            xmppCon.Port = 5222;
  41.            xmppCon.UseCompression = false;
  42.            xmppCon.ConnectServer = "talk.l.google.com";
  43.       }
  44.         void ClientSocket_OnSend(object sender, byte[] data, int count)
  45.        {
  46.            if (InvokeRequired)
  47.            {
  48.                BeginInvoke(new agsXMPP.net.ClientSocket.OnSocketDataHandler(ClientSocket_OnSend), new object[] { sender, data, count });
  49.                return;
  50.            }
  51.            
  52.        }
  53.  
  54.         void ClientSocket_OnReceive(object sender, byte[] data, int count)
  55.         {
  56.             if (InvokeRequired)
  57.             {
  58.                 BeginInvoke(new agsXMPP.net.ClientSocket.OnSocketDataHandler(ClientSocket_OnReceive), new object[] { sender, data, count });
  59.                 return;
  60.             }
  61.         }
  62.  
  63.         void xmppCon_OnWriteXml(object sender, string xml)
  64.         {
  65.             if (InvokeRequired)
  66.             {
  67.                 BeginInvoke(new XmlHandler(xmppCon_OnWriteXml), new object[] { sender, xml });
  68.                 return;
  69.             }
  70.         }
  71.  
  72.        void xmppCon_OnReadXml(object sender, string xml)
  73.         {
  74.             if (InvokeRequired)
  75.             {
  76.                BeginInvoke(new XmlHandler(xmppCon_OnReadXml), new object[] { sender, xml });
  77.                 return;
  78.             }
  79.         }
  80.        
  81.                void xmppCon_OnRosterStart(object sender)
  82.                {
  83.                    if (InvokeRequired)
  84.                    {
  85.                        BeginInvoke(new ObjectHandler(xmppCon_OnRosterStart), new object[] { sender });
  86.                        return;
  87.                    }
  88.               }
  89.  
  90.        void xmppCon_OnMessage(object sender, Message msg)
  91.        {
  92.          if (msg.Body == null)
  93.                return;
  94.  
  95.            if (InvokeRequired)
  96.            {
  97.                BeginInvoke(new agsXMPP.protocol.client.MessageHandler(xmppCon_OnMessage), new object[] { sender, msg });
  98.                return;
  99.            }
  100.  
  101.            // check for xData Message
  102.            Element e = msg.SelectSingleElement(typeof(Data));
  103.            if (e != null)
  104.            {
  105.                Data xdata = e as Data;
  106.                if (xdata.Type == XDataFormType.form)
  107.                {}
  108.            }
  109.            else
  110.            {
  111.                if (msg.Type == MessageType.chat)
  112.                {         
  113.                }
  114.            }
  115.        }
  116.        private void xmppCon_OnMessage(object sender, agsXMPP.protocol.client.Message msg, object data)
  117.         {
  118.             if (InvokeRequired)
  119.             {
  120.                BeginInvoke(new MessageCB(xmppCon_OnMessage), new object[] { sender, msg, data });
  121.                 return;
  122.             }
  123.        }
  124.         void xmppCon_OnAuthError(object sender, Element e)
  125.          {
  126.              if (InvokeRequired)
  127.              {
  128.                  BeginInvoke(new XmppElementHandler(xmppCon_OnAuthError), new object[] { sender, e });
  129.                  return;
  130.              }
  131.         }
  132.         void xmppCon_OnAgentStart(object sender)
  133.         {
  134.         }
  135.         void xmppCon_OnAgentEnd(object sender)
  136.         {
  137.         }
  138.         private bool ClientSocket_OnValidateCertificate(System.Security.Cryptography.X509Certificates.X509Certificate certificate, int[] certificateErrors)
  139.         {
  140.             return true;
  141.         }
  142.  
  143.         void xmppCon_OnClose(object sender)
  144.         {
  145.             if (InvokeRequired)
  146.             {
  147.               BeginInvoke(new agsXMPP.ObjectHandler(xmppCon_OnClose), new object[] { sender });
  148.                 return;
  149.             }
  150.        }
  151.         void xmppCon_OnError(object sender, Exception ex)
  152.         {
  153.             if (InvokeRequired)
  154.             {
  155.                 BeginInvoke(new ErrorHandler(xmppCon_OnError), new object[] { sender, ex });
  156.                 return;
  157.             }
  158.         }
  159.  
  160.         void xmppCon_OnIq(object sender, IQ iq)
  161.         {
  162.      
  163.             if (InvokeRequired)
  164.             {
  165.                BeginInvoke(new IqHandler(xmppCon_OnIq), new object[] { sender, iq });
  166.                 return;
  167.             }
  168.             Element query = iq.Query;
  169.             if (query != null)
  170.             {
  171.                 if (query.GetType() == typeof(agsXMPP.protocol.iq.version.Version))
  172.                 {
  173.                     // its a version IQ VersionIQ
  174.                     agsXMPP.protocol.iq.version.Version version = query as agsXMPP.protocol.iq.version.Version;
  175.                     if (iq.Type == IqType.get)
  176.                     {
  177.                         // Somebody wants to know our client version, so send it back
  178.                         iq.SwitchDirection();
  179.                         iq.Type = IqType.result;
  180.                         version.Name = "IM";
  181.                         version.Ver = "1.0";
  182.                         version.Os = Environment.OSVersion.ToString();
  183.                         xmppCon.Send(iq);
  184.                     }
  185.                 }
  186.             }
  187.        
  188.         }
  189.         void xmppCon_OnLogin(object sender)
  190.         {
  191.             if (InvokeRequired)
  192.             {
  193.                 BeginInvoke(new ObjectHandler(xmppCon_OnLogin), new object[] { sender });
  194.                 return;
  195.             }
  196.         }
  197.  
  198.         void xmppCon_OnPresence(object sender, Presence pres)
  199.         {
  200.             if (InvokeRequired)
  201.             {
  202.             BeginInvoke(new agsXMPP.protocol.client.PresenceHandler(xmppCon_OnPresence), new object[] { sender, pres });
  203.                 return;
  204.             }
  205.      
  206.         }
  207.         void xmppCon_OnRosterEnd(object sender)
  208.         {
  209.             if (InvokeRequired)
  210.             {
  211.                BeginInvoke(new ObjectHandler(xmppCon_OnRosterEnd), new object[] { sender });
  212.                 return;
  213.             }
  214.         }
  215.         void xmppCon_OnRosterItem(object sender, RosterItem item)
  216.         {
  217.             if (InvokeRequired)
  218.             {
  219.                 BeginInvoke(new agsXMPP.XmppClientConnection.RosterHandler(xmppCon_OnRosterItem), new object[] { this, item });
  220.                 return;
  221.             }
  222.         }
  223.         private void menuItem1_Click(object sender, EventArgs e)
  224.         {
  225.             this.Close();
  226.             Application.Exit();
  227.         }
  228.  
  229.         private void menuItem3_Click(object sender, EventArgs e)
  230.         {
  231.             //xmppCon.UseStartTLS = false;
  232.             xmppCon.Open();
  233.      
  234.         }
  235.         private void menuItem4_Click(object sender, EventArgs e)
  236.         {
  237.             xmppCon.Close();
  238.         }
  239.    }
This post was edited 2 times, last on 2018-03-22, 10:37 by Alex.
Avatar
Alex #7
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.dll

This exceptions look very strange. agsXMPP does not load any files. Did you try to debug you project with the agsXMPP source code?
Do you have the correct agsXMPP dlls and famework on your Mobile device?

Alex
Avatar
msathya03 #8
Member since Mar 2009 · 12 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,
      
     No,  I didn't change anything on agsXmpp source code. I just take agsxmpp>bin>debug>agsxmpp.dll file and agsxmpp>crypto.dll. Could u pls tell me where can I get the latest agsxmpp and crypto.dll files??

  And one more interesting thing i found today.  actually i removed the line UseStartTls = false. I printed the UseStartTls value. It showed true.  And i connected my windows mobile into my desktop via Usb cable (Activates my active sync) and i tested the application. It has connected at very first time itself. But if i remove the usb cable , again connection has closed. I mean using normal GPRS(I am using Airtel Mobile office GPRS plan) i couldn't able to connect with Google server. But with connection of active sync I can able to connect. Do u have any idea abt this ???

Thanks in advance. 

Thanks
M.Sathya.
Avatar
Alex #9
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I think you problems are related to your network on the mobile device and not to agsXMPP.
or agsXMPP it doesn't matter if the network is coming over Wlan, GPRS or over the desktop pc as host and USB.

Alex
Avatar
msathya03 #10
Member since Mar 2009 · 12 posts
Group memberships: Members
Show profile · Link to this post
HI,
 I tried my IM application with my another PocketPC mobile.It was working fine. But some times I am getting the System.IO.EndOfStream Exception in Crypto.dll.I need to try xmpp.open() again and again to connect with server.
when i try to run the application on my Emulator also I am getting the same error. Nearly i need to try more than 12-14 times. Then only i am getting the server connection. When i logout from the connection , that time also i am getting the same error. Exception in crypto.dll really hitting my head.
I did all IM functionalities in my project. But bcz of crypto.dll error I couldn't get the connection .

I have the follwoing doubts. Pls Clarify .
1. whether I have the updated crypto.dll or not??

[I have taken latest sdk from ag-software site . I delpoy the agsxmpp2008_cf and I add the reference from  agsxmpp\bin\CF2\Debug\agsxmpp.dll and agsxmpp\bin\CF2\Debug\crypto.dll into my project.]
It is correct??? or is there any other way to add those two references?

2. If wrong from where I need to take the latest (without error) crypto.dll file and agsxmpp.dll files . how can Ifind whether I have the  correct agsXMPP dlls and famework on my Mobile device or my project.
3.Crypto.dll which I am using was crashed or what???


I don't know what to do?
I am waiting for ur detailed reply.

XML debug for ur reference:
xmppCon.Port: 5222
xmppCon.UseCompression: False
xmppCon.ConnectServer: talk.l.google.com
xmppCon.KeepAlive: True 
xmppCon.AutoResolveConnectServer: False
xmppCon.UseStartTLS: True


IPV4
  1. On Write XML ------- SEND:<presence><status /><priority>10</priority></presence>
  2. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  3. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="E3A3443A7B06281C" >
  4. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required /></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
  5. On Write XML ------- SEND:<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  6. On Read XML ------- RECV:<stream:error xmlns:stream="http://etherx.jabber.org/streams"><not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-streams" /></stream:error>
  7. On Read XML ------- RECV:</stream:stream>
OnClose():-

IPV4
  1. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  2. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="126E60B922D47F5F" >
  3. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required /></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
  4. On Write XML ------- SEND:<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  5. On Read XML ------- RECV:<proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
A first chance exception of type 'System.IO.EndOfStreamException' occurred in crypto.dll
OnClose():-

IPV4
  1. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  2. The thread 0x566e736e has exited with code 0 (0x0).
  3. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="26B2DE8ADCDA4C9C" >
  4. The thread 0x23b8253e has exited with code 0 (0x0).
  5. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required /></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
  6. On Write XML ------- SEND:<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  7. The thread 0x76a2df82 has exited with code 0 (0x0).
  8. On Read XML ------- RECV:<proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  9. The thread 0x23b8253e has exited with code 0 (0x0).
  10. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  11. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="EEB539A2978E74C8" >
  12. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
  13. On Write XML ------- SEND:<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">XXX</auth>
  14. On Read XML ------- RECV:<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
  15. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
A first chance exception of type 'System.IO.EndOfStreamException' occurred in crypto.dll
A first chance exception of type 'System.IO.IOException' occurred in crypto.dll
OnClose():-

IPV4
  1. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  2. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="1C9F50BB3F148098" >
  3. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required /></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
  4. On Write XML ------- SEND:<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  5. On Read XML ------- RECV:<proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  6. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  7. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="C63E230A7D692DED" >
  8. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
  9. On Write XML ------- SEND:<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">XXX</auth>
  10. On Read XML ------- RECV:<success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
  11. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  12. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="512CF904C079F58A" >
  13. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /><session xmlns="urn:ietf:params:xml:ns:xmpp-session" /></stream:features>
  14. On Write XML ------- SEND:<iq id="agsXMPP_1" type="set" to="gmail.com"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>agsXMPP</resource></bind></iq>
A first chance exception of type 'System.IO.EndOfStreamException' occurred in crypto.dll
OnClose():-

IPV4
  1. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  2. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="774C95055C68634E" >
  3. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"><required /></starttls><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
  4. On Write XML ------- SEND:<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  5. On Read XML ------- RECV:<proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  6. On Write XML ------- SEND:<stream:stream to='gmail.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
  7. On Read XML ------- RECV:<stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="gmail.com" version="1.0" id="95C72144B814ABBB" >
  8. A first chance exception of type 'System.IO.EndOfStreamException' occurred in crypto.dll
  9. A first chance exception of type 'System.IO.IOException' occurred in crypto.dll
  10. On Read XML ------- RECV:<stream:features xmlns:stream="http://etherx.jabber.org/streams"><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
  11. On Write XML ------- SEND:<auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">XXX</auth>
Onclose():-
This post was edited 2 times, last on 2018-03-22, 10:38 by Alex.
Avatar
Alex #11
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
The CF still has no SslStream which is required for stream encryption (SSL or TLS). the crypto.dll adds Tls support, but it does not work anymore since the latest changes on the GTalk server. If you want to connect to GTalk then set the property UseTls = false.

The crypto.dll is from Bouncy Castle. You can get the latest crypto.dll here:
http://www.bouncycastle.org/csharp/

You can get the latest agsXMPP.dll for CF here from the download area on our webpage:
http://www.ag-software.net/index.php?page=downloads
I tested this dll soem minutes ago and it works for me with GTalk on PocketPC.

Alex
Avatar
msathya03 #12
Member since Mar 2009 · 12 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,
     Thank you very much for ur kind help to solve my issue.
  After set the property UseStartTls = false, now I can able to connect with Google Server on my both Windows mobile and Pocket PC .

But if i set that property , I couldn't able to connect with the server when I run using Emulator. I am getting
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.dll
same exception. But if i remove this line works fine on my emulator. May be the problem in my system.

Once again thank you very much.
M.Sathya.
Avatar
Alex #13
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
It looks like your emulator has no Internet access.
You have to configure the emulator for Internet access over active sync and connect it to active sync.

Alex
Avatar
msathya03 #14
Member since Mar 2009 · 12 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,
     I am doing like that only. I connected my emulator thro' active sync . But still I am getting the problem..

Regards,
M.Sathya.
Avatar
Alex #15
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
if it works on a real device but not on the emulator it must be configuration issue on your site. I don't think I can help you with that.

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: agsXMPP RSS