Creating meeting never creates a meeting

84 views Asked by At

I have the following code to create a meeting in exchange:

        _exchangeService = new ExchangeService
        {
            Url = EwsUrl,
            Credentials = new NetworkCredential(Username, Password)
        };

        Appointment appointment = new Appointment(_exchangeService);
        appointment.Subject = "New meeting";
        appointment.Start = start;
        appointment.End = end;
        await appointment.Save();

This all goes through without error being thrown in code, however when I look at my calendar, no meeting has been created.

Can anyone suggest any reason why this might be, or what I can do to fix this?

2

There are 2 answers

1
NotTelling On

In the appointment.Save() method, you have to specify a sending mode.

For example: appointment.Save(SendInvitationsMode.SendToNone).

Furthermore you could try

appointment.Save(WellknownFolderName.Calendar, SendInvitationsMode.SendToNone);

which will save a copy of the meeting into your calendar.

0
Manfred On

I had the problem, that it always creates a meeting instead of an appointment. Due to the fact i didn't add an attendee.

I found the solution here! I have to save with the parameter "SendInvitationsMode.SendToNone".

appointment.save(SendInvitationsMode.SendToNone);