Take the 2-minute tour ×

I am trying to implement a simple Breeze controller in Asp.Net MVC4, but can't seem to access it. Is it possibly conflicting with .Net's standard Web.Api ?

If my url is http://localhost:49479/api/values then I get a good return value from Web Api.

However if my url is http://localhost:49479/breeze/Breeze I get "Http 404" error "Resource not found".

If my url is http://localhost:49479/breeze/Breeze/5 I get error No HTTP resource was found that matches the request URI 'http://localhost:49479/breeze/Breeze/5'.

Your advice is greatly appreciate.

Here's what I have in ..Controllers/BreezeController.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Breeze.ContextProvider;
using Breeze.WebApi2;
using Newtonsoft.Json;

   namespace RageSys.Controllers
    public class BreeezeController : ApiController
        // GET api/values
        public string Get(int id)
            return "value";
        public IEnumerable<string> GetMtm(int id)

and in BreezeWebApiConfig.cs :

using System.Web.Http;

[assembly: WebActivator.PreApplicationStartMethod(
    typeof(RageSys.App_Start.BreezeWebApiConfig), "RegisterBreezePreStart")]
namespace RageSys.App_Start {
  /// Inserts the Breeze Web API controller route at the front of all Web API routes
  public static class BreezeWebApiConfig {

    public static void RegisterBreezePreStart() {
          name: "BreezeApi",
          routeTemplate: "breeze/{controller}/{action}"
share|improve this question
Your controller is named Breeeze controller with 3 e's... –  PW Kad Jul 1 at 21:39
thank you. I'm still getting the same error, though. Is there a conflict maybe with WebApi residing side by side ? –  bob Jul 1 at 23:01
Nope not at all. Your route is set up for breeze/{controller}/{action} but you are calling breeze/{controller} only. Add the action... –  PW Kad Jul 1 at 23:07
@PWKad - so if I calling it as localhost:49479/breeze/breeze/5 why am I still getting the error "No HTTP resource was found that matches the request URI. It does work when i call localhost:49479/api/values/5 , however. –  bob Jul 1 at 23:11
Change it to something like breeze/breeze/GetMtm/1 –  PW Kad Jul 1 at 23:15

1 Answer 1

The result you are getting from your api/values request is not coming from the listed controller. You must have the default ValuesController and WebApiConfig (which defines a route that takes a parameter) still in your project.

You do not have a route for http://localhost:49479/breeze/Breeze/5. The third segment (currently 5) needs to be the name of an Action method. For you, that means GetMtm. You do not have a route that takes any parameters, so you'll get nothing from: http://localhost:49479/breeze/Breeze/GetMtm/5 unless you define such a route. You probably don't want to do this though, because Breeze coupled with Entity Framework will make life very easy. You should implement the simplest possible Breeze / Entity Framework application and see how it works from there.

share|improve this answer

Your Answer


