title: Count not load type [ProjectName].WebAPIApplication on Web API project
body: <p>I have a .Net Web Application using the Web.API Project Properties show it is using .Net 4.5</p>
  
  <p>In my web page the following code calls one of methods.</p>
  
  <pre><code>                $.ajax({
                      type: 'POST',
                      url: '/Appointments/GetMissingKeys',
                      data:  $('#mrnList').val()                      
                  }).done(function() {
                      alert('done!');
                  }).fail(function (Status, errorThrown) {
                      alert('Error: ' + Status.status + ' - ' + Status.statusText);
                  }).always(function () {
                      alert('All done or not');
                  });
  </code></pre>
  
  <p>This in turn should be calling the following</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Net;
  using System.Net.Http;
  using System.Web.Http;
  
  namespace MRNInput.Controllers
  {
      public class AppointmentController : ApiController
      {
          [AcceptVerbs("Post")]
          [Route("Appointments/GetMissingKeys")]
          HttpResponseMessage GetMissingAppointmentKeys([FromBody]String MRNList)
          {
              HttpResponseMessage resp = null;
  
              resp = new HttpResponseMessage(HttpStatusCode.Accepted);
              return resp;
          }
      }
  }
  </code></pre>
  
  <p>When I check the status object I am getting an internal server error (500) and the response says the following</p>
  
  <pre><code>Server Error in '/' Application.
  --------------------------------------------------------------------------------
  
  Parser Error 
  Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 
  
  Parser Error Message: Could not load type 'MRNInput.WebApiApplication'.
  
  Source Error: 
  
  
  Line 1:  &lt;%@ Application Codebehind="Global.asax.cs" Inherits="MRNInput.WebApiApplication" Language="C#" %&gt;
  
  
  Source File: /global.asax    Line: 1 
  
  --------------------------------------------------------------------------------
  Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408 
  </code></pre>
  
  <p>I did check the code of Global.asax.cs</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.Http;
  using System.Web.Routing;
  
  namespace MRNInput
  {
      public class WebApiApplication : System.Web.HttpApplication
      {
          protected void Application_Start()
          {
              GlobalConfiguration.Configure(WebApiConfig.Register);
          }
      }
  }
  </code></pre>
  
  <p>Now apart from the .Net version in the error page - cannot see why it cannot load this last class. If it is the .Net version reported in the error how can I get it to run under the correct .Net version (4.5)</p>