【发布时间】:2019-03-06 06:33:14
【问题描述】:
我正在尝试从不同页面登录网站并返回该 URL。但我无法调用我的控制器。
假设: 我正在尝试从此 URL 调用控制器: http://localhost:50208/VendorStore/40/Products/Categories
并声明控制器 http://localhost:50208/VendorStore/Account/ExternalLoginCallback
但是当点击按钮时它会重定向到http://localhost:50208/VendorStore/40/Account/ExternalLoginCallback
登录按钮代码:
`@Html.ActionLink("Login", "ExternalLoginCallback","Account", new { returnUrl = Request.Url.PathAndQuery }, null) `
控制器代码:
[AllowAnonymous]
public async Task<ActionResult> ExternalLoginCallback(string returnUrl)
{
}
【问题讨论】:
标签: c# asp.net-mvc model-view-controller