title: How to call a webservice when in localhost
body: <p>I do not have IIS, I use my localhost that comes with Visual Studio, I am not sure how to make a service call work if I am using localhost. It tells me "Unable to connect to remote server" , Is there a way I can make a webservice call work using localhost?. Here is my code:</p>
  
  <pre><code>    public void CallService()
      {
          WebRequest requestweb = WebRequest.Create("http://localhost/WebServices/MyTestService/HelloWorld");
          requestweb.Method = "GET";
          //Line below returns "Unable to connect to remote server"
          WebResponse response = requestweb.GetResponse();
          Console.WriteLine(((HttpWebResponse)response).StatusDescription);
          Stream data = response.GetResponseStream();
          response.Close();
      }
  </code></pre>
  
  <p>Would truly appreciate an advice on this. Thank you</p>