C# AspNetCore MVC-ControllerBase.挑战问题
尝试在我的mvc项目中使用如下内容C# AspNetCore MVC-ControllerBase.挑战问题,c#,asp.net-core,asp.net-core-2.0,asp.net-core-mvc-2.0,.net-4.6.1,C#,Asp.net Core,Asp.net Core 2.0,Asp.net Core Mvc 2.0,.net 4.6.1,尝试在我的mvc项目中使用如下内容 [Authorize] public IActionResult SignIn() { return Challenge(new AuthenticationProperties { RedirectUri = "/" }, OpenIdConnectDefaults.AuthenticationScheme); } 但是得到下面的错误 无法将Microsoft.AspNetCore.Http.Authentication.Authenti
[Authorize]
public IActionResult SignIn()
{
return Challenge(new AuthenticationProperties { RedirectUri = "/" }, OpenIdConnectDefaults.AuthenticationScheme);
}
但是得到下面的错误
无法将Microsoft.AspNetCore.Http.Authentication.AuthenticationProperties转换为字符串
我做错什么了吗
更新
找到了问题
它是对AuthenticationProperties
这来自Microsoft.AspNetCore.Authentication
和Microsoft.AspNetCore.Http.Authentication
它指向的是Microsoft.AspNetCore.Http.Authentication,它认为这是导致问题的原因它认为您正在尝试呼叫