This is my scenario: I have to read email from exchange 2010 sp2 accounts. I have to use Exchange Web Services, POP3 and IMAP are blocked. I have to test my app in an enviro
This is a old post I thought I'd put in a full example solution for the error reported. Simply replace service.AutodiscoverUrl("someuser@somedomain.org"); with System.Uri("https://mail.somedomain.org/ews/Exchange.asmx");
Here's the full block of code
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
service.Credentials = new WebCredentials("someuser", "somepassword");
//service.AutodiscoverUrl("someuser@somedomain.org");
service.Url = new System.Uri("https://mail.somedomain.org/ews/Exchange.asmx");