Ted
Ted

Reputation: 2585

EWS - Can't load FirstDayOfWeek property of Appointment.Recurrence

I can successfully load the Recurrence property for an Appointment using EWS (connecting to an Office 365 server), but when I try to access the FirstDayOfWeek property of a WeeklyPattern I always get the following exception:

FirstDayOfWeek threw an exception of type 'Microsoft.Exchange.WebServices.Data.ServiceValidationException

All other properties of the WeeklyPattern seem to load happily (see below) except this.

enter image description here

Is it possibly down to the requested server version I'm using when creating the ExchangeService object?

thisConnection = New ExchangeService(ExchangeVersion.Exchange2010)

I've checked the AppointmentSchema properties available when loading the Appointment, and other than AppointmentSchema.Recurrence (which I am obviously using) there doesn't seem to be anything else I'm missing there.

Upvotes: 0

Views: 94

Answers (1)

MadDev
MadDev

Reputation: 1150

The FirstDayOfWeek property is not available in the exchange version you have referenced.

The property was introduced in Exchange Server 2010 Service Pack 1 (SP1).

See reference in the Remarks section of this article

You would need to install that service pack and change your code to the below:

thisConnection = New ExchangeService(ExchangeVersion.Exchange2010_SP1)

Upvotes: 1

Related Questions