title: Error accessing a WCF service from a client
body: <p>I have created a simple WCF service that adds two integers. The service host started perfectly. But on the client-side, I am getting the following compilation error in <code>Reference.cs</code>:</p>
  
  <blockquote>
    <p>The type name 'ServiceReference1' does not exist in the type
    'WcfServiceClient.ServiceReference1.WcfServiceClient'</p>
  </blockquote>
  
  <p>Client-Side Code:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  
  namespace WcfServiceClient
  {
      public partial class WebForm1 : System.Web.UI.Page
      {
          protected void Page_Load(object sender, EventArgs e)
          {
  
          }
  
          protected void Button1_Click(object sender, EventArgs e)
          {
              ServiceReference1.WcfServiceClient client = new ServiceReference1.WcfServiceClient("BasicHttpBinding_IWcfService");
              int result = client.Add(Convert.ToInt32(TextBox1.Text), Convert.ToInt32(TextBox2.Text));
              Label1.Text = result.ToString();
          }
      }
  }
  </code></pre>