Microsoft Exchange Example : Autodiscover not found RRS feed

  • Question

  • Hi all,

    I need to send some emails generated with C# code, by using EWS (exchange web service).

    Microsoft gives this example of code, but it doesn't work on my side; and the code doesn't contain any host and no domain for the Exchange 2010 server (my C# code is not in the same domain than the Exchange server).

    The Microsoft example crashes saying "The Autodiscover service coundn't be located"

    if (userData.AutodiscoverUrl == null)
    RedirectionUrlValidationCallback); => Exception : "The Autodiscover service couldn't be located."
       userData.AutodiscoverUrl = service.Url;
       service.Url = userData.AutodiscoverUrl;
    private static bool RedirectionUrlValidationCallback(string redirectionUrl)
      bool result = false;
      Uri redirectionUri = new Uri(redirectionUrl);
      if (redirectionUri.Scheme == "https")
        result = true;
      return result;


    Thursday, April 24, 2014 10:24 AM