title: ASP.NET Web API OData batch returning HTTP 404
body: <p>I'm getting started with ASP.NET Web API v2 and OData (v3). <br />
  I've got a client made with JayData v 1.3.6</p>
  
  <p><strong>Client Context</strong></p>
  
  <pre><code>onlinedb = new $todo.Types.ToDoContext({
      name: 'oData',
      oDataServiceHost: 'http://localhost:49375/odata'
  });
  </code></pre>
  
  <p><strong>Server Routes</strong></p>
  
  <pre><code>public static void Register(HttpConfiguration config)
  {
      // Web API configuration and services
      ODataConventionModelBuilder builder = new ODataConventionModelBuilder();
      builder.ContainerName = "WebAPIDataCollectorContext";
      builder.EntitySet&lt;TodoItem&gt;("Todo");
      config.Routes.MapODataRoute("odata", "odata", builder.GetEdmModel(), new DefaultODataBatchHandler(GlobalConfiguration.DefaultServer));
  
      // Web API routes
      config.MapHttpAttributeRoutes();
  
      config.Routes.MapHttpRoute(
          name: "DefaultApi",
          routeTemplate: "api/{controller}/{id}",
          defaults: new { id = RouteParameter.Optional }
      );
  
      config.EnableCors();
  }
  </code></pre>
  
  <p><strong>Request</strong> <br />
  OPTIONS /odata/$batch HTTP/1.1 (From Fiddler)</p>
  
  <p><strong>Response</strong>  <br /></p>
  
  <pre><code>{"Message":"No HTTP resource was found that matches the request URI 'http://localhost:49375/odata/$batch'.","MessageDetail":"No route providing a controller name was found to match request URI 'http://localhost:49375/odata/$batch'"}
  </code></pre>
  
  <p><strong>Comments</strong> <br /> </p>
  
  <pre><code>http://localhost:49375/odata/Todo (GET operation) is working fine.
  </code></pre>
  
  <p>The question is: Why is batch operation failing?</p>
  
  <p>Thanks!</p>