title: Microsoft exchange web service (EWS) not working when my application is hosted on IIS
body: <pre><code>ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1)
  {
      Credentials = new WebCredentials("usrname", "pass#1234")
  };
  
  //to add logic for itemview
  service.AutodiscoverUrl("emailaddress@test.com");
  </code></pre>
  
  <p>When I'm running the above code in my application hosted on iis , it is throwing an error 'autodiscover service couldn't be located'.</p>
  
  <p>But when I am running the same on visual studio development server it is working fine.
  <br/> How to solve this issue?</p>