title: apns-sharp as a wcf service in IIS---not working
body: <p>I've resorted to using <strong>apns-sharp</strong> and while it works perfectly as a console app and as a basichttpbinding WCF service on my machine(tested with wcftestclient), when I host the WCF service in IIS it doesnt give me any errors(SSL enabled). </p>
  
  <p>Since I use monotouch for development I built the required classes using slsvcutil. I tested a few asynchronous calls and they work fine and return the right values. The issue is my application crashes when I make a call to send the push notification.</p>
  
  <p>I call it like any other method call as below:</p>
  
  <pre><code> client.PushCompleted += HandlePushCompleted;
          client.PushAsync();
  
  
  void HandlePushCompleted (object sender, PushCompletedEventArgs e)
      {
          InvokeOnMainThread( delegate{  
          try
          {
  
              string value = e.Result.ToString();
  
  
          }
              catch(Exception ex)
          {
              Console.WriteLine("ERROR IS " + ex.InnerException);
              Console.WriteLine("STACKTRACE IS " + ex.StackTrace);
          }
          } );
  
  
      }
  </code></pre>
  
  <p>and here is the error and stack trace:</p>
  
  <pre><code>ERROR IS System.MissingMethodException: No constructor found for 
  System.ServiceModel.FaultException`1[[System.ServiceModel.Except   ionDetail
  , System.ServiceModel, Version=2.0.5.0, Culture=neutral,     
  PublicKeyToken=31bf3856ad364e35]]::.ctor(System.ServiceModel.ExceptionDetail, 
  System.ServiceModel.FaultReason,     System.ServiceModel.FaultCode, (unknown)) 
  at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, 
  System.Reflection.Binder binder, System.Object[] args, 
  System.Globalization.CultureInfo culture, System.Object[] 
  activationAttributes) [0x00174] 
  in /Developer/ MonoTouch/Source/mono/mcs/class/corlib/System/Activator.cs:299 
  at System.Activator.CreateInstance (System.Type type, 
  System.Object[] args, System.Object[] activationAttributes) [0x00000] 
  in /Developer/MonoTouch/Source/mono/mcs/class/corlib/ System/Activator.cs:234 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) 
  [0x00000] in 
  /Developer/MonoTouch/Source/ mono/mcs/class/corlib/System/Activator.cs:229 
  at System.ServiceModel.MonoInternal.ClientRuntimeChannel.Request 
  (System.ServiceModel.Description.OperationDescription od, 
  System.Object[] parameters) [0x001a6] in 
  /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel
  /System.ServiceModel/ClientRuntimeChannel.cs:557 at 
  System.ServiceModel.MonoInternal.ClientRuntimeChannel.DoProcess 
  (System.Reflection.MethodBase method, System.String operationName, 
  System.Object[] parameters) [0x00038] in 
  /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel
  /System.ServiceModel/ClientRuntimeChannel.cs:502 at 
  System.ServiceModel.MonoInternal.ClientRuntimeChannel.Process 
  (System.Reflection.MethodBase method, System.String operationName, 
  System.Object[] parameters) [0x0001c] in 
  /Developer/MonoTouch/Source/mono/mcs/class/System.ServiceModel
  /System.ServiceModel/ClientRuntimeChannel.cs:479 
  STACKTRACE IS at 
  System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary () 
  [0x0002d] in /Developer/MonoTouch/Source/mono/mcs/class/System
  /System.ComponentModel/AsyncCompletedEventArgs.cs:54 at 
  PushCompletedEventArgs.get_Result () [0x00000] in 
  /Users/*/Desktop/App/Apps/proxy/Service.cs:273 at 
  ElectricityIOSApp.FirstViewController+c_AnonStorey1.&lt;&gt;m_2 () 
  [0x00000] in /Users/*/Desktop/App/Apps/AppController.cs:519
  </code></pre>
  
  <p>Your help is much appreciated.</p>