Invalid Asp.Net MVC URL generated by Url.Action!

I search and read all the questions that I can find here and on Google, and I can not find the answer!

The questions in this question say:

routes.MapRoute("Admin - Change Password", "Admin/ResetPassword/{UserId}", New With {.controller = "Admin", .action = "ResetPassword", .UserId = ""})

Created by Url It Generation: / Admin / UserAdmin

which is the url.action page. I don’t know if it matters or not.

When I used the route debugger, it showed Url, I expect it to be generated as the corresponding URL that I typed in my address bar.

True Admin / ResetPassword / {UserId} controller = Admin, action = ResetPassword, userId =

The only other routes he matched were:

True {controller} / {action} / {id} controller = Home, action = Index, id =

True {* catchall} (null)

The route {controller} / {action} / {id} is the last, so it should not interfere.

Any ideas?

EDIT: :

<%Url.Action("ResetPassword", "Admin", new with {.UserId= u.userId}) %>
+3
2

Action/ActionLink URI . RouteLink/RouteUrl. , , . .

+7

, , , , ?

IIS ? XP/IIS 5.1, ? IIS 5.1.

.

0

Source: https://habr.com/ru/post/1723035/


All Articles