title: Web API loads via URL but get Error 404 from Angular script
body: <p>I have a WebAPI method here:</p>
  
  <pre><code>http://localhost:50463/api/movies
  </code></pre>
  
  <p>and when accessing it from a browser it loads perfectly.</p>
  
  <p>In my project (the same project as where Web API resides) when calling the method from AngularJS I get an error 500:</p>
  
  <blockquote>
    <p>Failed to load resource: the server responded with a status of 500 (Internal Server Error)</p>
  </blockquote>
  
  <p>When I click the link in the error it loads the data perfectly.</p>
  
  <p>The routing for WebAPI is as follows:</p>
  
  <pre><code>config.Routes.MapHttpRoute("DefaultApiGet", "Api/{controller}", 
      new {action = "Get"}, 
      new {httpMethod = new HttpMethodConstraint(HttpMethod.Get)}
  );
  </code></pre>
  
  <p>This is the angular call</p>
  
  <pre><code>app.factory('dataFactory', function ($http) {
  
      var factory = {};
  
      factory.data = function (callback) {
          $http.get('/api/movies').success(callback);
      };
  
      return factory;
  });
  </code></pre>
  
  <p>I added this javascript just to rule-out angular, I get the same:</p>
  
  <pre><code>$.ajax({
  url: "/api/movies",
  type: 'GET',
  //data: "{ 'ID': " + id + "}",
  contentType: "application/json; charset=utf-8",
  success: function(data) {
      alert(data);
  },
  error: function (xhr, ajaxOptions, thrownError) {
      alert(thrownError);
  }
  });
  </code></pre>
  
  <p>Any idea what I have done wrong?</p>