title: Dynamically Invoke Web Service At Runtime
body: <p>I am using the sample code to dynamically invoke a web service from this site:
  <a href="http://www.crowsprogramming.com/archives/66" rel="nofollow noreferrer">http://www.crowsprogramming.com/archives/66</a></p>
  
  <p>The issue that I am facing is when I use the Class to call a web service from a web application I get the following error: "<strong>The remote host cannot be found</strong>" and the error happens at the following line of code:
  <strong>if (!ServiceDescription.CanRead(xmlreader))</strong></p>
  
  <p>But if I use the same code from a windows application to connect to the web service:
  <a href="http://www.w3schools.com/webservices/tempconvert.asmx?WSDL" rel="nofollow noreferrer">http://www.w3schools.com/webservices/tempconvert.asmx?WSDL</a></p>
  
  <p>it works fine. I am not sure how to resolve this issue. Has anyone else faced the same issue and was able to resolve it then would appreciate some pointers in the right direction.</p>