带有MVC 5的ASP.NET身份版本3?

时间:2017-05-21 07:09:59

标签: asp.net authentication asp.net-core asp.net-identity asp.net-mvc-5

我知道我们可以在ASP.NET 核心应用程序中使用 asp.net identity 3 ,但是我们可以在MVC5应用程序中使用此版本的asp.net身份吗?我认为我们只能使用带有MVC5应用程序的asp.net身份2,但我不确定。我有一个MVC5应用程序,我不想将其转换为核心应用程序。谢谢您的回答。

1 个答案:

答案 0 :(得分:5)

Asp.Net Identity 3专门为Asp.Net Core编写。由于Asp.Net Core有重大变化,因此无法在Asp.Net 4.5中使用Asp.Net Identity 3。如果您不想升级到Core,则必须坚持使用版本2.

但是,您可以考虑从应用程序中删除身份验证。另一种方法是为服务器实现IdentityServer4(Core),并为应用程序使用IdentityServer3(4.5)软件包。

https://www.scottbrady91.com/Identity-Server/Getting-Started-with-IdentityServer-4