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
Post a Comment