Hello there,
I've got a strange problem in EWS Exchange Developtment ( c# )
Everytime i try to Update an appointment i've just created exchange creates another appointment.
Does anyone know why this happens?
All i do is changing the room resource of the appointment.
Here is the Code for creating the Item:
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2); service.Credentials = new NetworkCredential(serviceAccount, servicePasswort); service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, mail); service.Url = new Uri(exchangeWebService); Appointment raumbuchung = new Appointment(service); raumbuchung.Subject = betreff; raumbuchung.Body = buchung.Beschreibung; raumbuchung.Body.BodyType = BodyType.HTML; raumbuchung.Start = Start; raumbuchung.End = End; raumbuchung.Location =room; raumbuchung.AllowNewTimeProposal = false; raumbuchung.RequiredAttendees.Add(email); raumbuchung.Resources.Add(roomAdress); raumbuchung.Save(SendInvitationsMode.SendToAllAndSaveCopy); return raumbuchung.Id.UniqueId;
and the Codeblock for updating:
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2); service.Credentials = new NetworkCredential(serviceAccount, servicePasswort); service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, mail); service.Url = new Uri(exchangeWebService); Appointment raumbuchung = Appointment.Bind(service, new ItemId(TerminID)); raumbuchung.Subject = betreff; raumbuchung.Body = beschreibung; raumbuchung.Body.BodyType = BodyType.HTML; raumbuchung.Start = start; raumbuchung.End = end; raumbuchung.Location = newRoom; raumbuchung.AllowNewTimeProposal = false; raumbuchung.IsResponseRequested = false; raumbuchung.Update(ConflictResolutionMode.AlwaysOverwrite); return raumbuchung.Id.UniqueId;
Is there anything wrong? One thing I recognized is when the appointment got an update it changes the UniqueId.