Skip to content

Two controller with the same name #4482

@imclint21

Description

@imclint21

I've a MVC project with two folders, Controllers\Dashboard and Controllers\API, the API and the regular controllers has the same action names, and when i make a link by example to archive a campaign like this:

<a asp-controller="Campaigns" asp-action="Archive">Archive Campaign</a>

It's the API that it's called, by example /api/campaigns/archive/uid?uid=60011969-6369-43a0-930a-ab7b686bbac0 and not the Dashboard controller.

What is the correct way to fix this problem ? it's not really a bug but there no documentation how to fix this kind of problems.

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesquestion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions