c# - Controller cannot be found -


I am working on an asp.net mvc 4 site. I have an Artist Controller within the Controllers folder.

East> routes MapRoute (name: "Artist API", URL: "API / Artist / {Action} / {ID}}", default: new {controller = "artist", verb = "go", id = UrlParameter.Optional});

When I try to test this call, I get:

No HTTP resource found which matches the request URI . No type was found which matches the controller named 'Artist'.

This works if I remove the API part from the path:

  url: "artist / {action} / {id}"   

I am not using webapp, just a general controller.

Why did not the controller get on this route

thanks!

Make sure that you do not have any WebApiConfig.cs file in your App_Start folder to your root definition Can override.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -