title: EWS: Set action is invalid for property when updating occurrence in a series
body: <p>I am using the EWS API 1.2.1 from Microsoft to communicate with Exchange Server 2007 SP1. When I try to update a specific occurence in a series I allways get the error: 'Set action is invalid for property'. The sample below creates a masterrecurrence which is succesfull then I bind to this masterrecurrence and try to update the 3rd sequence in the series. This fails...</p>
  
  <pre><code>this is the stack trace:
  
  Microsoft.Exchange.WebServices.Data.ServiceResponseException was unhandled
  Message=Set action is invalid for property.
  Source=Microsoft.Exchange.WebServices
  StackTrace:
    at Microsoft.Exchange.WebServices.Data.ServiceResponse.InternalThrowIfNecessary()
    at Microsoft.Exchange.WebServices.Data.ServiceResponse.ThrowIfNecessary()
    at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()
  </code></pre>
  
  <p>Can anybody help me with this problem? Thanks in advance!!</p>
  
  <p>Below you find the complete testcode I have set up.</p>
  
  <p>Thanks and best regards! </p>
  
  <p>Dimitri</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using Microsoft.Exchange.WebServices.Data;
  using System.Security.Cryptography.X509Certificates;
  using System.Net.Security;
  
  namespace EWS_testWithRecurrences
  {
      class Program
      {
  
  
      static void Main(string[] args)
      {
          ExchangeService _service = new ExchangeService(ExchangeVersion.Exchange2007_SP1,    TimeZoneInfo.Utc);
          string ls_master = string.Empty;
  
          // SSL - security (for accademius sake)
          System.Net.ServicePointManager.ServerCertificateValidationCallback =
              delegate(Object obj, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
              {
                  return true;
              };
  
          _service.Url = new Uri("https://exchangeserver/EWS/exchange.asmx");
          _service.Credentials =  new System.Net.NetworkCredential("username", "password", "domain");
  
  
          // Add master for accedemius sake
          Appointment app = new Appointment(_service);
          app.Subject = "Weekly on friday!";
          app.Start = new DateTime(2012, 7, 13, 10, 0,0);
          DayOfTheWeek[] days = new DayOfTheWeek [] { DayOfTheWeek.Friday };
          app.End = new DateTime(2012, 7, 13, 10, 0, 0).AddHours(2);
          app.Recurrence = new Recurrence.WeeklyPattern(app.Start.Date, 1, days);
          app.Recurrence.StartDate = app.Start.Date;
          app.Recurrence.NumberOfOccurrences = 10;
          // Save: works!
          app.Save();
          ls_master = app.Id.UniqueId;
  
          // Occurrence exception (bind to master) and change the 3rd series in the sequence
          Appointment occurrence = Appointment.BindToOccurrence(_service, new ItemId(ls_master),3);
          occurrence.Subject = "Urgent status update";
          occurrence.Start = new DateTime(2012, 7, 11, 14, 0, 0);
          occurrence.End = new DateTime(2012, 7, 11, 14, 0, 0).AddHours(2);
          occurrence.StartTimeZone = TimeZoneInfo.Utc;
          // Save ==&gt; this fails!
          occurrence.Update(ConflictResolutionMode.AlwaysOverwrite);
      }
    }
  }
  </code></pre>