I want to read/connect other user inbox mail(office outloook 2010) from my pc using user credentials. But I am getting below error.
The Autodiscover service couldn't be located
plz give me a solution.
public void ConnectToExchangeServer()
{
ExchangeService exchange = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
try
{
exchange.TraceEnabled = true;
exchange.Credentials = new WebCredentials("xyz", "xyz", "xyz.in");
exchange.AutodiscoverUrl("xyz@xyz.com", RedirectionUrlValidationCallback);
exchange.Url `enter code here`= new Uri("https://usercomputername.domainname");
EnableFolderPermissions(exchange);
}
catch (Exception ex)
{
}
}