Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am attempting to query EWS with VB.Net, and I can retrieve most of the attributes for an appointment that I want however when I am attempting to retrieve the IsCancelled attribute the following exception is being encountered: This property was requested, but it wasn't returned by the server.

Is anyone able to advise if there are any problems with the IsCancelled attribute (ie is it always set to true or false)?

Our environment is a mixed one, EWS is running from Exchange 2007SP1, however we do have 2010 servers (about to embark on the upgrade in a month or so).

Can anyone point me to any resources on all attribute's available through EWS, the list is long and I am sure there are other usefull gems out there that I havent stumbled accross yet.

Any resources on tracking appointments in mailboxes setup as resources (using rooms in 2010, but not there yet), such as Cancelled and Updated meetings would be greatly appreciated.

Thanks,

Matt

share|improve this question
    
According to the docs, it should be either true/false. Are you sure the item is an Appointment type? It might explain the lack of that property if it is something else. –  Ben Pilbrow Sep 5 '11 at 17:54
    
Ill check that out, I ended up having to bind to each item returned from the FindItems call which has helped somewhat. Are you able to provide a link to the docs? –  Lima Sep 6 '11 at 0:31
    
I've added an answer for you. Additionally, this might be better over on Stack Overflow, however I'll let others decide its fate. –  Ben Pilbrow Sep 6 '11 at 11:49

1 Answer 1

up vote 1 down vote accepted

According to the documentation of the property, it is a bool type and not Nullable<bool> so it should always return something.

The fact you're getting the This property was requested, but it wasn't returned by the server message might suggest you're asking for an inappropriate property for the item returned (i.e asking for the isCancelled property on an EmailMessage type.

What I'd do is a simple sanity check and verify your list of returned items are all of type Appointment and not something else.

You could try calling the FindAppointments method of the ExchangeService class which will look exclusively for items that are appointments, but I've personally had a few problems with that not returning exactly what I expected. What I ended up doing was calling FindItems<Appointment>(WellKnownFolderName.Calendar, new ItemView(1000)) and looping over those.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.