【发布时间】:2020-08-04 16:55:08
【问题描述】:
我将 Angular 配置为使用“登录”路由来显示 LoginComponent 页面。没关系。
但是当我尝试访问一些没有登录的授权页面时,我在浏览器中得到了以下地址:
https://localhost:5001/Identity/Account/Login?ReturnUrl=%2Fapi%2FMyController%2FMyAction
这个错误:
默认的 Identity UI 布局需要通常位于“/Pages/_LoginPartial”或“/Views/Shared/_LoginPartial”的局部视图“_LoginPartial”才能工作。根据您的配置,我们在以下位置查看了它:
/Areas/Identity/Pages/Account/_LoginPartial.cshtml
/Areas/Identity/Pages/_LoginPartial.cshtml
/Areas/Identity/Pages/Shared/_LoginPartial.cshtml
/Areas/Identity/Views/Shared/_LoginPartial.cshtml
/Pages/Shared/_LoginPartial.cshtml
/Views/Shared/_LoginPartial.cshtml
是否可以指向 /login 页面而不是 /Identity/Account/Login ?
【问题讨论】:
标签: c# asp.net-core