I am sorry, but I could not reproduce the problem using 4.6 version. The same code was giving the error with 4.5.
Could you please tell us which version of .NET you are using and share the code for sending, updating and canceling the appointment. You may send it via the forum "Contact" --> "Send saqib.razzaq an email".
Here is my code for sending, updating and canceling the appointment.
For sending the appointment:
Appointment app = new Appointment("Location", "Meeting with Doctor", "simple description", DateTime.Now, DateTime.Now,
new MailAddress("sender@domain.com"),
new MailAddressCollection("recipient@domain.com"));
app.Description = "
";
MailMessage msg = new MailMessage("sender@domain.com", "recipient@domain.com", "appointment request", "appointment request");
string strMsgFile = @"E:\Data\Aspose\temp\appointment.msg";
msg.Save(strMsgFile, MessageFormat.Msg);
msg.AddAlternateView(app.RequestApointment(0));
strAppUniqueID = app.UniqueId;
SmtpClient client = new SmtpClient("mail.domain.com", "sender@domain.com", "password");
client.Send(msg);
MessageBox.Show("Appointment request sent");
// For Updating the appointment
MailMessage msg = new MailMessage("sender@domain.com", "recipient@domain.com", "appointment request", "appointment request");
Appointment app = new Appointment("Location", "Meeting with Doctor", "monthly checkup", DateTime.Now.AddDays(5), DateTime.Now.AddDays(5),
new MailAddress("sender@domain.com"),
new MailAddressCollection("recipient@domain.com"));
app.UniqueId = strAppUniqueID;
msg.AddAlternateView(app.UpdateAppointment(1));
SmtpClient client = new SmtpClient("mail.domain.com", "sender@domain.com", "password");
client.Send(msg);
MessageBox.Show("Appointment update request sent");
// For canceling the appointment
MailMessage msg = new MailMessage("sender@domain.com", "recipient@domain.com", "appointment request", "appointment request");
Appointment app = new Appointment("Location", "Meeting with Doctor", "monthly checkup", DateTime.Now.AddDays(10), DateTime.Now.AddDays(10),
new MailAddress("sender@domain.com"),
new MailAddressCollection("recipient@domain.com"));
app.UniqueId = strAppUniqueID;
msg.AddAlternateView(app.CancelAppointment(2));
SmtpClient client = new SmtpClient("mail.domain.com", "sender@domain.com", "password");
client.Send(msg);
MessageBox.Show("Appointment cancel request sent");