locked
Can we access EWS Managed API from WinJS metro style applications

    Question

  • In our project Win JS Metro style application, we need to read the calendar appointments and Notes of specific user from Exchange server. Can we use the EWS Managed API services in my metro application? If yes, please guide me how can I access the EWS managed API Services.

    Thanks in Advance.

      
    Wednesday, May 29, 2013 2:39 PM

Answers

All replies

  • You should be able to use the Exchange Web Services (EWS) SOAP API.

    I don't believe there is an EWS managed wrapper for Windows Store apps.

    For more information on EWS see the Exchange Dev Center and the Exchange development forum 

    --Rob

    Wednesday, May 29, 2013 3:20 PM
    Owner
  • I was able to connect to EWS referencing the Microsoft.Exchange.WebServices.dll and it works fine when debugging the Store app in Visual Studio.

    ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
    service.Url = new Uri("https://OURSERVER/EWS/Exchange.asmx");
    service.UseDefaultCredentials = true;
    service.Timeout = 12000;
    EmailMessage message = new EmailMessage(service);
    message.ToRecipients.Add("something@something");
    byte[] screenshot = await ImageToByteArrayAsync(bitmapStream);
    message.Attachments.AddFileAttachment("screenshot.bmp", screenshot);
    message.Body = "stuff";
    message.SendAndSaveCopy();           


    Unfortunately, when you run the deployed application it throws an exception reporting "Unable to load resources for resource file Microsoft.Exchange.WebServices.Strings in package".

    Friday, May 02, 2014 1:54 PM