Skip to content

Problem with non-API routes. Any way to filter out controllers? #399

Closed
@hugoqribeiro

Description

@hugoqribeiro

Hello.

I have a host that runs a set of normal MVC routes (with views) and MVC API routes. These are segmented this way:

/{route} -> views
/api/v{version:apiVersion}/{route} -> API

If I have a route like this:

[GET] /myroute

And for some reason, I call it with a POST I get the following error, instead of the expected 404:

The HTTP resource that matches the request URI 'http://localhost:5000/myroute' does not support HTTP method 'POST'.

The problem here is that the "versioning middleware" is kicking in and I haven't found a way to tell it to completly ignore the MVC controllers (or a specific one for that matter).

Is there any way to achieve this?

Thanks in advance.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions