Hi All.
I am developing a window 8 metro app where i have to use the ExchaneWebServices to create tasks and display all tasks back into my app. I used the following code.
public MainPage()
{
service = new ExchangeService(ExchangeVersion.Exchange2010_SP1);
service.Credentials = new WebCredentials(userEmail, userPassword);
service.AutodiscoverUrl(userEmail, RedirectionUrlValidationCallback);
FindAllTasks();
}
static void FindAlltasks()
{
//Create the extended property definition.
ExtendedPropertyDefinition taskCompleteProp = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Task, 0x0000811C, MapiPropertyType.Boolean);
//Create the search filter.
SearchFilter.IsEqualTo filter = new SearchFilter.IsEqualTo(taskCompleteProp, false);
//Get the tasks.
FindItemsResults<item> tasks = service.FindItems(WellKnownFolderName.Tasks, filter, new ItemView(50));
}
i am getting the error on last line of MainPage() when creating project in visual studio 2012 and windows 8
is it to do something with Exchange webservice 1.2 or 2.0 dll?because the same code work in a console application built in vs2010
Your valuable suggestions are welcome. Plz help.