title: WCF Service, the type provided as the service attribute values…could not be found
body: <p>When I right click on <code>Eval.svc</code> within Visual Studio 2012 and view in browser, I get the following - </p>
  
  <blockquote>
    <p>The type 'EvalServiceLibary.Eval', 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>
  
  <p>When I run the WCF service from the test client, all works fine.</p>
  
  <p>Eval service:</p>
  
  <pre><code>[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
  public class EvalService : IEvalService
  {
      Dictionary&lt;string, JobPhaseTimer&gt; jobTimers = new Dictionary&lt;string, JobPhaseTimer&gt;();
  
      public void SubmitEntry(ENBO.Jobs.Job job, ENBO.Jobs.JobDetail jobDetail, ENBO.TimeLogs.TimeLog timeLog, ENBO.Users.User user, ENBO.Utilities.EntryType entryType, JobPhase jobPhase)
      {
          if (entryType == EntryType.Active)
          {
              JobPhaseTimer timer = new JobPhaseTimer();
              timer.UID = job.ID + "_" + jobPhase.ID;
              timer.JobID = job.ID;
              timer.JobDetailID = jobDetail.ID;
              timer.PhaseID = jobPhase.ID;
              timer.StartTime = DateTime.Now;
              timer.Stopwatch.Start();
              jobTimers.Add(timer.UID, timer);
  
              TimeLog log = new TimeLog();
              log.JobID = job.ID;
              log.PhaseID = jobPhase.ID;
              log.UserID = user.ID;
              log.DateEntry = DateTime.Now;
              log.EntryType = EntryType.Active;
  
              if (log.AddNewTimeLog())
              {
                  //Do something
              }
          }
          else if (entryType == EntryType.Paused)
          {
              JobPhaseTimer timer = jobTimers[job.ID + "_" + jobPhase.ID];
              timer.Stopwatch.Stop();
  
              TimeLog log = new TimeLog();
              log.JobID = job.ID;
              log.PhaseID = jobPhase.ID;
              log.UserID = user.ID;
              log.DateEntry = DateTime.Now;
              log.EntryType = EntryType.Paused;
  
              if (log.AddNewTimeLog())
              {
                  //Do something
              }
          }
      }
  }
  </code></pre>
  
  <p><code>IEvalService.cs</code> (Service Contract)</p>
  
  <pre><code>[ServiceContract]
  public interface IEvalService
  {
      [OperationContract]
      void SubmitEntry(Job job, JobDetail jobDetail, TimeLog timeLog, User user, EntryType entryType, JobPhase jobPhase);
  }
  </code></pre>
  
  <p><code>Eval.svc</code> markup :</p>
  
  <pre><code>&lt;%@ ServiceHost Language="C#" Debug="true" Service="EvalServiceLibary.Eval" %&gt;
  </code></pre>
  
  <p><code>Web.config</code> :</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
  
    &lt;appSettings&gt;
      &lt;add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" /&gt;
    &lt;/appSettings&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.5" /&gt;
      &lt;httpRuntime targetFramework="4.5"/&gt;
    &lt;/system.web&gt;
    &lt;system.serviceModel&gt;
      &lt;services&gt;
        &lt;service name="EvalServiceLibary.EvalService"&gt;
          &lt;endpoint address="" behaviorConfiguration="" binding="webHttpBinding"
        contract="EvalServiceLibary.IEvalService" /&gt;
          &lt;endpoint address="" binding="basicHttpBinding" bindingConfiguration=""
        contract="EvalServiceLibary.IEvalService" /&gt;
        &lt;/service&gt;
      &lt;/services&gt;
      &lt;behaviors&gt;
        &lt;endpointBehaviors&gt;
          &lt;behavior name="EvalServiceSite.EvalAspNetAjaxBehavior"&gt;
            &lt;enableWebScript /&gt;
          &lt;/behavior&gt;
        &lt;/endpointBehaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name=""&gt;
            &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;protocolMapping&gt;
          &lt;add binding="basicHttpsBinding" scheme="https" /&gt;
      &lt;/protocolMapping&gt;    
      &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true"
        multipleSiteBindingsEnabled="true" /&gt;
    &lt;/system.serviceModel&gt;
    &lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
      &lt;directoryBrowse enabled="true"/&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Any ideas why I am getting this error? I have searched Google and come across a few pages but nothing seems to work.</p>
  
  <p>Thanks!</p>