0
votes

I'm trying to set an outlook appointment in c# using EWS.. its working fine on windows 7, vs 2008, API 2.1 but when I tried it on Win Server 2008, vs2008, and API 1.2 I get this Error: The Autodiscover service couldn't be located

 ExchangeService service = new ExchangeService();
        service.Credentials = new WebCredentials("xxx", "xxx", "xxxx");
        service.Url =  new Uri("https://outlook.xxx/ews/exchange.asmx");
        service.AutodiscoverUrl("[email protected]");
1

1 Answers

0
votes

I guess the problem is with the user account and AD settings.

EWS make use of the given credentials to authenticate itself to access Autodiscover service

Firstly check the credentials if they are correct, then check if the account settings have been set to "user has to change password on first login" or “deny access to the autodiscover service. If any of these two are selected, then uncheck both in AD settings and you will be done.