title: Web API - Failed to load resource: the server responded with a status of 404
body: <p>I am developing angular js with web api.</p>
  
  <p>I have this cotroller: Controller/MasterController, and thiis in my WebApi Config:</p>
  
  <pre><code>HttpConfiguration config = new HttpConfiguration();
  config.Routes.MapHttpRoute(
      name: "DefaultApi",
      routeTemplate: "api/{controller}/{id}",
      defaults: new { id = RouteParameter.Optional }
  );
  </code></pre>
  
  <p>I call this function from Global.asax, Application_Start event.</p>
  
  <p>I call my web api from service.js like that:</p>
  
  <pre><code>var service = function ($http) {
      var _$http = $http;
      self = this;
      self.getMenuItems = function () {
          var promise = _$http({
              method: "GET",
              url: 'api/Master'
          }).success(function (data, status, headers, config) {
  
          }).error(function (data, status, headers, config) {
  
          });
          return promise;
      };
  </code></pre>
  
  <p>In debug mode, I saw that I reach this area.
  I get this error in chrome console:
  <strong>"Failed to load resource: the server responded with a status of 404"</strong></p>
  
  <p>and this is what he was trying to get to: <code>http://localhost:12345/api/Master</code></p>
  
  <p>Also, I tried to get to the web api controller directly through the browser, and I couldn't find it.</p>
  
  <p>Thank You</p>