title: Pushsharp connection failure
body: <p>So I am using push sharp inside of my ASP.NET mvc application and I keep getting a connection failure error.  I installed the NUGET package for push sharp so I don't have access to the source code. It took me a while to realize I was getting this error since I wasn't running in debug for a while.  First off here is the error code I get.</p>
  <blockquote>
  <p>An unhandled exception of type PushSharp.Apple.ConnectionFailureException occurred in PushShart.Apple.DLL</p>
  <p>Additional Information: Maximum number of attempts (3) to connect to gateway.sandbox.push.apple.com:2195 was reached!</p>
  </blockquote>
  <p>This is the code I am using for the push notificaitons.  Its pretty simple.</p>
  <pre><code>public int samplePush()
      {
          var push = new PushBroker();
          var appleCert = File.ReadAllBytes(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, &quot;Certificates1.p12&quot;));
          var settings = new ApplePushChannelSettings(false, appleCert, &quot;1111&quot;);
          push.RegisterAppleService(settings);
          push.QueueNotification(new AppleNotification()
              .ForDeviceToken(&quot;c49e457bc041dead313f43684a42a0acdc8d4393b229db08e2873849a8a2db22&quot;)
              .WithAlert(&quot;Test push notification&quot;)
              .WithSound(&quot;default&quot;)
              .WithBadge(7));
          push.OnNotificationFailed += push_OnNotificationFailed;
          push.StopAllServices();
          return 200;
      }
  </code></pre>
  <p>I have tried a number of things, first I used multiple certificates including the pem file but none of them give me any errors as far as invalid certificates go.</p>
  <p>I also manually opened up port 2195 to allow all connections, I also tried this from multiple connections one of them being my work connection which has worked for push notifications in the past.  I am at a loss here of what could be causing this problem.</p>