title: apple push notification with APNS sharp
body: <p>i use APNS Sharp library for my apple push notification. i have downloded from <a href="http://code.google.com/p/apns-sharp/downloads/list" rel="nofollow noreferrer">Here</a>.i use sample test program provided by APNS sharp library without any modification.
  <br>it simply does not send any notification until i put break point at that line of code.
  if i put break point. i just work fine.is this expected behaviour or i am doing something wrong. and also i am not getting any exception. thanks for any help.
  here is the code </p>
  
  <pre><code>static void Main(string[] args)
  {
      bool sandbox = true;
      string testDeviceToken = "Token";
      string p12File = "apn_developer_identity.p12";
      string p12FilePassword = "yourpassword";
      int sleepBetweenNotifications = 15000;
      string p12Filename = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, p12File);
      NotificationService service = new NotificationService(sandbox, p12Filename, p12FilePassword, 1);
      service.SendRetries = 5; 
      service.ReconnectDelay = 5000; //5 seconds
      service.Error += new NotificationService.OnError(service_Error);
      service.NotificationTooLong += new NotificationService.OnNotificationTooLong(service_NotificationTooLong);
      service.BadDeviceToken += new NotificationService.OnBadDeviceToken(service_BadDeviceToken);
      service.NotificationFailed += new NotificationService.OnNotificationFailed(service_NotificationFailed);
      service.NotificationSuccess += new NotificationService.OnNotificationSuccess(service_NotificationSuccess);
      service.Connecting += new NotificationService.OnConnecting(service_Connecting);
      service.Connected += new NotificationService.OnConnected(service_Connected);
      service.Disconnected += new NotificationService.OnDisconnected(service_Disconnected);
      Notification alertNotification = new Notification(testDeviceToken);
      alertNotification.Payload.Alert.Body = "Testing {0}...";
      alertNotification.Payload.Sound = "default";
      alertNotification.Payload.Badge = i;
      if (service.QueueNotification(alertNotification))
        Console.WriteLine("Notification Queued!");
      else
        Console.WriteLine("Notification Failed to be Queued!");
      Console.WriteLine("Cleaning Up...");
  
      service.Close();// if i dont put a break point in here, it simply does not send any notification
  
      service.Dispose();
  
  }
  </code></pre>
  
  <p>i hope my question is clear...<br>
  <strong>Update:</strong> i am stuck here.please any one can help me.</p>