locked
Problems with EWS -> ExchangeService RRS feed

  • Question

  • Hi,

     

    I am new to EWS, and have added my service reference fine in vs 2010. However, most the code samples i've been looking at use an object of type  ExchangeService, and I cannot access / find this object. My service reference contains an object of type ExchangeServicePortTypeClient but when i try to use that object with the following code, I get this error:

     'Could not find default endpoint element that references contract 'Service.ExchangeServicePortType' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.'

     

    Code:

     

     

    ExchangeServicePortTypeClient exchange = new ExchangeServicePortTypeClient();

    All I would like to do is to  read a mailbox from c#, enumerate and process its items. Does anyone have a soup to nuts example. I am new to WCF.

     

    Thanks in advance,

    M

    Thursday, August 5, 2010 7:50 AM

Answers

  • I believe if you use EWS Managed API, you use add reference and not add service reference?
    • Marked as answer by MJOw Friday, August 6, 2010 1:19 AM
    Thursday, August 5, 2010 8:08 AM

All replies

  • I believe if you use EWS Managed API, you use add reference and not add service reference?
    • Marked as answer by MJOw Friday, August 6, 2010 1:19 AM
    Thursday, August 5, 2010 8:08 AM
  • Ah! Ooops. Thanks Tin tin
    Friday, August 6, 2010 1:19 AM