Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 when cancel edit role #1

Open
LeiYangGH opened this issue Jun 8, 2021 · 1 comment
Open

404 when cancel edit role #1

LeiYangGH opened this issue Jun 8, 2021 · 1 comment

Comments

@LeiYangGH
Copy link

LeiYangGH commented Jun 8, 2021

  1. Clone Repo, build and run.
  2. Register new user, and login, then User Roles --> Manage Roles(the page url is like https://localhost:44306/UserRoles/Manage?userId=1f1b9e26-61ec-4919-9464-6b8ffb4cab3f) --> then click Cancel

Expected: back to User Roles page( where there is list of users)
Actual: Got 404, page url is still same as above(before cancel).
image

Env: .net5.0 Win10 VS2019

@jeffwiegner
Copy link

Edit file Views/UserRoles/Manage.cshtml
Change lines 29 and 30 from

<a asp-action="EditUser" asp-route-id="@ViewBag.userId"
               class="btn btn-primary" style="width:auto">Cancel</a>

To

<a asp-area="" asp-controller="UserRoles" asp-action="Index"
               class="btn btn-primary" style="width:auto">Cancel</a>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants