title: OperationBehaviorAttribute error when running svcutil.exe on WCF service
body: <p>I'm getting a very strange error when I try to run svcutil.exe on a WCF service.</p>
  <blockquote>
  <p>&quot;OperationBehaviorAttribute can only go on the service class&quot;</p>
  <p>[InvalidOperationException]: OperationBehaviorAttribute can only go on the service class, it cannot be put on the ServiceContract interface. Method 'EditProduct' on type 'IProductWCF' violates this.&quot;</p>
  </blockquote>
  <p>I have pasted my code below and if anybody can shed any light on this, I'd really appreciate it.</p>
  <p>I should point out that it works on every method except &quot;EditOpportunityProductTypes&quot;</p>
  <p>My Interface:</p>
  <pre><code>namespace ProductWCF
  {
      [ServiceContract]
      public interface IProductWCF
      {
          [OperationContract]
          string SayHello(AppointmentFeedback objAppointmentFeedback);
  
          [OperationContract]
          Boolean CreateAppointmentFeedback(AppointmentFeedback objAppointmentFeedback);
  
          [OperationContract]
          List&lt;ExpiringContractType&gt; GetOpportunityProductTypes(int opportunityId);
  
          [OperationBehavior]
          Boolean EditOpportunityProductTypes(List&lt;ExpiringContractType&gt; lstExpiringContractTypes, int opportunityId);
      }
  }
  </code></pre>
  <p>My Service:</p>
  <pre><code>namespace ProductWCF
  {
      public class Service : IProductWCF
      {
          [OperationBehavior]
          public string SayHello(AppointmentFeedback objAppointmentFeedback)
          {
              return objAppointmentFeedback.Notes;
          }
  
          [OperationBehavior]
          public Boolean CreateAppointmentFeedback(AppointmentFeedback objAppointmentFeedback)
          {    
              ProductData.CRM.Objects.AppointmentFeedback objNewAppointmentFeedback = new AppointmentFeedback();    
              if (objNewAppointmentFeedback.Insert(objAppointmentFeedback.AppointmentId, objAppointmentFeedback.StarId, objAppointmentFeedback.AppointmentStatusId, objAppointmentFeedback.Notes, objAppointmentFeedback.Creator, objAppointmentFeedback.AttendeeName) &gt; 0)
                  return true;
              else
                  return false;
          }
  
          [OperationBehavior]
          public List&lt;ExpiringContractType&gt; GetOpportunityProductTypes(int opportunityId)
          {    
              return OpportunityProductTypeMethods.GetOpportunityConnectionTypes(opportunityId);
                        
          }
  
          [OperationBehavior]
          public Boolean EditOpportunityProductTypes(List&lt;ExpiringContractType&gt; lstExpiringContractTypes, int opportunityId)
          {
              return ProductData.CRM.Objects.OpportunityProductTypeMethods.UpdateOpportunityConnectionTypes(lstExpiringContractTypes, opportunityId);
          }
      }
  }
  </code></pre>