title: The Autodiscover service couldn't be located
body: <p>I have code to send email using Exchange Web Services (EWS 1.1 API). There is no exception if I use the hardcoded parameter values, like:</p>
  
  <pre><code>service.AutodiscoverUrl("me@mydomain.com",
      delegate
      {
      return true;
      });
  </code></pre>
  
  <p>But If I try to use a variable then I am getting error while discovering URL, "The Autodiscover service couldn't be located".</p>
  
  <pre><code>string userName = "me@mydomain.com";
  service.AutodiscoverUrl(userName,
      delegate
      {
      return true;
      });
  </code></pre>
  
  <p>Is there any way to use variables with autodiscoverurl method? What am I doing wrong?</p>
  
  <p>Sanjay</p>