title: Beginner WCF Service setup
body: <p>I'm trying to figure out WCF Services.  I got 1 to work 1 time and now I can't seem to get this to work at all (even following the previous examples).  I don't understand several things about the WCF Services.  For example why does it need endpoints.  What purpose do they serve?  However, if any one could help me get past this error that would be great.</p>
  
  <p>I'm trying to setup a default WCF Service.  I haven't added any code.  I'm just trying to get the service to display.</p>
  
  <p>I have pilltrakr.cs</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Runtime.Serialization;
  using System.ServiceModel;
  using System.Text;
  
  namespace serviceContract
  {
      public class pilltrakr : Ipilltrakr
      {
          public void DoWork()
          {
          }
      }
  }
  </code></pre>
  
  <p>I have Ipilltrakr:</p>
  
  <pre><code>namespace serviceContract
  {
      // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "Ipilltrakr" in both code and config file together.
      [ServiceContract]
      public interface Ipilltrakr
      {
          [OperationContract]
          void DoWork();
      }
  }
  </code></pre>
  
  <p>I have: pilltrakr.svc</p>
  
  <pre><code>&lt;%@ ServiceHost Language="C#" Debug="true" Service="pilltrakr" CodeBehind="~/App_Code/pilltrakr.cs" %&gt;
  </code></pre>
  
  <p>In my web.config I have the following:</p>
  
  <pre><code>  &lt;system.serviceModel&gt;
      &lt;services&gt;
        &lt;service name="serviceContract.pilltrakr" behaviorConfiguration="InternalWebService"&gt;
          &lt;endpoint contract="serviceContract.Ipilltrakr" binding="basicHttpBinding" address="pilltrakr" 
  bindingConfiguration="InternalHttpBinding" bindingNamespace="serviceContract"/&gt;
        &lt;/service&gt;
      &lt;/services&gt;
    &lt;/system.serviceModel&gt; 
  </code></pre>
  
  <p>I'm getting the following error:</p>
  
  <blockquote>
    <p>Server Error in '/pilltrakr' Application. The type 'pilltrakr',
    provided as the Service attribute value in the ServiceHost directive,
    or provided in the configuration element
    system.serviceModel/serviceHostingEnvironment/serviceActivations could
    not be found. Description: An unhandled exception occurred during the
    execution of the current web request. Please review the stack trace
    for more information about the error and where it originated in the
    code.</p>
    
    <p>Exception Details: System.InvalidOperationException: The type
    'pilltrakr', provided as the Service attribute value in the
    ServiceHost directive, or provided in the configuration element
    system.serviceModel/serviceHostingEnvironment/serviceActivations could
    not be found.</p>
  </blockquote>