none
EWS :- Unable to load resources for resource file "Microsoft.Exchange.WebServices.Strings" RRS feed

  • Question

  • 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.


    • Edited by Yeshveer88 Wednesday, April 10, 2013 7:46 AM
    Tuesday, April 9, 2013 7:20 AM

All replies

  • Hello Yeshveer88,

    The EWS Managed API is not compatible with Windows Store Apps. At this time, you will need to create a custom client to interface with EWS. This means that you can use the Add Service Reference to generate an object model. You'd still need to implement an Autodiscover client.

    With regards,


    Michael | Microsoft Exchange Developer Content

    The Exchange Development Forum Guide has useful information for using the Exchange Development Forum.

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Monday, April 15, 2013 7:47 PM
    Moderator
  • Hi Michael,

    Thanks a lot for your valuable suggestion I was waiting for someone to reply although I got your point I have creating my own service to implement it and they are working fine for outlook.

    But can you help me in what could be the url that i should provide for the hotmail and the gmail account in connecting to server by autodiscover method although it is working for the outlook but i cant find a way for connecting to the above servers.

    My code is something like this 

    void connect()

    {

    ExchangeServer service;              

      service = new ExchangeService(ExchangeVersion.Exchange2010_SP1);
                    service.Credentials = new WebCredentials(userEmail, userPassword);
    service.AutodiscoverUrl(userEmail, RedirectionUrlValidationCallback);
    }               

    static bool RedirectionUrlValidationCallback(String redirectionUrl)
            {
                bool redirectionValidated = false;
                if (redirectionUrl.Equals("https://autodiscover-s.outlook.com/autodiscover/autodiscover.xml"))
                    redirectionValidated = true;

                return redirectionValidated;
            }

    what should I provide the url in the redirectionUrl.

     



    • Edited by Yeshveer88 Tuesday, April 16, 2013 12:21 PM
    Tuesday, April 16, 2013 5:03 AM