Skip to content

Url.Action doesn't include action name when there are more parameters #24480

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


Hi, this is simple one.
I have default route defined like this:

app. UseEndpoints(endpoints =>
{
	endpoints. MapDefaultControllerRoute();
	endpoints. MapControllers();
});

Now, I call:
Url.Action("GroupCategoryView", new { id = "(sheetGroupId)", categoryId = "(categoryId)"})

I was expecting address like:
/Document/GroupCategoryView/(sheetGroupId)?categoryId=(categoryId)
(Document is my controller name), but instead it gives:

/(sheetGroupId)?categoryId=(categoryId)


Original Comments

Feedback Bot on 7/23/2020, 03:23 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Feedback Bot on 7/23/2020, 10:58 PM:

Thank you for sharing your feedback! Our teams prioritize action on product issues with broad customer impact. See details at: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2019#faq. In case you need answers to common questions or need assisted support, be sure to use https://visualstudio.microsoft.com/vs/support/. We’ll keep you posted on any updates to this feedback.

ajachocki on 7/24/2020, 01:55 AM:

After I removed HttpGet attribute from controller method it started working. So maybe this was my mistake. And one should not use those attributes on not api controllers.


Original Solutions

(no solutions)

Metadata

Metadata

Assignees

Labels

Author: Migration Bot 🤖The issue was created by a issue mover bot. The author may not be the actual author.Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.Status: No Recent Activityaffected-fewThis issue impacts only small number of customersarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesbugThis issue describes a behavior which is not expected - a bug.feature-routingseverity-minorThis label is used by an internal tool

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions