jjzjj

IAuthenticationSignInHandler

全部标签

c# - 无效操作异常 : No IAuthenticationSignInHandler is configured to handle sign in for the scheme: MyCookieAuthenticationScheme

我正在尝试按照说明进行操作here将Cookie身份验证添加到我的网站。到目前为止,我添加了以下内容:InvoketheUseAuthenticationmethodintheConfiguremethodoftheStartup.csfile:app.UseAuthentication();InvoketheAddAuthenticationandAddCookiemethodsintheConfigureServicesmethodoftheStartup.csfile:services.AddAuthentication("MyCookieAuthenticationScheme