title: Unable to connect to GCM using agsXMPP (No connection could be made because the target machine actively refused it)
body: <p>I've been trying for about a day to just open an XMPP connection to GCM using the agsXMPP library.  I'm new to the library and XMPP in general so its entirely possible i'm making a silly mistake.  The only other thing that I know could be the problem is that my project has not yet been whitelisted by google, but I had read elsewhere that you should still be able to connect initially.  My code is as follows:</p>
  
  <pre><code>class Program
  {
  
      static void Main(string[] argus)
      {
  
          XmppClientConnection xmpp = new XmppClientConnection();
          xmpp.UseSSL = true;
          xmpp.UseStartTLS = false;
          xmpp.Server = "gcm.googleapis.com";
          xmpp.ConnectServer = "gcm.googleapis.com";
          xmpp.Port = 5235;
          xmpp.Password = "My Api Key";
          xmpp.Username = "My Project Id";
          xmpp.OnAuthError += OnAuthError;
          xmpp.OnError += OnError;
          xmpp.OnSocketError += new ErrorHandler(objXmpp_OnSocketError);
  
          xmpp.Open();
  
          // Just to keep the app open
          while (true) 
          {
              System.Threading.Thread.Sleep(100);
          }
  
      }
  
      static void objXmpp_OnSocketError(object sender, Exception ex)
      {
          return;
      }
  
      static void OnAuthError(object sender, agsXMPP.Xml.Dom.Element e)
      {
          return;
      }
  
      static void OnError(object sender, Exception ex)
      {
          return;
      }
  
  
  
  
  }
  </code></pre>
  
  <p>What ends up happening is that i hit the SocketError with the following error:</p>
  
  <p>No connection could be made because the target machine actively refused it 74.125.20.188:5235</p>
  
  <p>Is this because I have yet to be whitelisted, or is there more that I can do with agsXMPP settings? Any help is appreciated.</p>
  
  <p>EDIT: Project was whitelisted, unfortunately I am still getting the same error. So that rules that out as a cause.</p>