title: AutodiscoverLocalException: The Autodiscover service couldn't be located
body: <p>I want to access exchange server by using .NET 3.5. Here is my code:</p>
  
  <pre><code>class Program
  {
      static void Main(string[] args)
      {
          try
          {
              ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1);
              service.Credentials = new WebCredentials("email_test@xxx.com", "abcd");
  
              service.AutodiscoverUrl("email_test@xxx.com");
  
              EmailMessage message = new EmailMessage(service);
              message.Subject = "Interesting";
              message.Body = "The proposition has been considered.";
              message.ToRecipients.Add("abc@xxx.com");
              message.SendAndSaveCopy();
          }
          catch (Exception ex)
          {
              Console.WriteLine(ex.ToString());
          }
      }
  }
  </code></pre>
  
  <p>I am referring <a href="http://msdn.microsoft.com/en-us/library/exchange/dd633626%28v=exchg.80%29.aspx" rel="nofollow">this article</a> to write the codes:</p>
  
  <p>But I receive this exception:</p>
  
  <blockquote>
    <p>AutodiscoverLocalException: The Autodiscover service couldn't be located.</p>
  </blockquote>
  
  <p>Anyone can help?</p>