title: Web Api 404 error The resource cannot be found
body: <p>I try to use Web Api for send/get data from server.
  WebApiConfig.cs :</p>
  
  <pre><code>    config.MapHttpAttributeRoutes();
  
      config.Routes.MapHttpRoute(
              name: "DefaultApi",
              routeTemplate: "{controller}/{action}"
          );
  </code></pre>
  
  <p>RouteConfig.cs:</p>
  
  <pre><code>public static void RegisterRoutes(RouteCollection routes)
      {
          routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
          routes.MapRoute(
                              name: "Default",
                              url: "{controller}/{action}/{id}",
                              defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
                      );
      }
  </code></pre>
  
  <p>Globa.asax.cs:</p>
  
  <pre><code>    protected void Application_Start()
      {
          AreaRegistration.RegisterAllAreas();
          FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
          RouteConfig.RegisterRoutes(RouteTable.Routes);
          BundleConfig.RegisterBundles(BundleTable.Bundles);
          GlobalConfiguration.Configure(WebApiConfig.Register);
  
      }
  </code></pre>
  
  <p>Api controller (ServicesController.cs):</p>
  
  <pre><code>public class ServicesController : ApiController
  {
  
      public List&lt;TreeMenuItem&gt; LoadMetadata()
      {
          List&lt;TreeMenuItem&gt; itemsMenu = new List&lt;TreeMenuItem&gt;();
          TreeMenuItem dataSource = new TreeMenuItem("1", "DataSources", null);
          itemsMenu.Add(dataSource);
          return itemsMenu;
      }
  }
  </code></pre>
  
  <p>I'm trying to access api from angularJS controller like bellow:</p>
  
  <pre><code>angular.module("App", ["ngRoute", "ngResource"])
  .controller('MainController', ["$scope", "$http", MainController]);
  
  function MainController($scope, $http) {
  var baseUrl = "Services/LoadMetadata";
  var params = {};
  $http.post(baseUrl, params)
      .then(function (data) {
          $scope.roleList = data.data;
  });
  }
  </code></pre>
  
  <p>I get error 404 on $http.post for "Services/LoadMetadata"!
  I tried some version using route - same error 404.
  Any help?</p>