Microsoft.AspNet.Identity.Core和Microsoft.AspNetCore.Identity有什么区别? [英] What is the difference between Microsoft.AspNet.Identity.Core and Microsoft.AspNetCore.Identity?
问题描述
我正在ASP.NET MVC应用程序中实现AspNet身份.但是,当我浏览在线资料时,我对2个dlls Microsoft.Aspnet.Identity.Core
和Microsoft.AspNetCore.Identity
感到非常困惑.
I am implementing the AspNet identity in ASP.NET MVC application. But when I am going through the online materials I am quite confused about the 2 dlls Microsoft.Aspnet.Identity.Core
and Microsoft.AspNetCore.Identity
.
我确实知道Microsoft.AspNetCore.Identity
将在.NET Core应用程序中使用,但是Microsoft.Aspnet.Identity.Core
似乎没有最新更新,并且发现它甚至没有让用户登录(在自定义asp身份中引发失败).所以我的问题是我可以在MVC应用程序中使用Microsoft.AspNetCore.Identity
还是应该坚持使用Microsoft.Aspnet.Identity.Core
?
I do know that Microsoft.AspNetCore.Identity
is to be used in .NET Core applications but Microsoft.Aspnet.Identity.Core
seems to have no recent updates and found that it is not even letting the user to login (throwing Failure in custom asp identity). So my question is can I use Microsoft.AspNetCore.Identity
in MVC application or should I stick to Microsoft.Aspnet.Identity.Core
?
推荐答案
Microsoft.AspNet.Identity.Core与ASP.NET Core无关,它只是表明它是主要内容的一种方法(因此,"core)(ASP.NET Core之前的版本)库.由于您没有使用ASP.NET Core,因此必须使用Microsoft.AspNet.Identity.Core.
Microsoft.AspNet.Identity.Core has nothing to do with ASP.NET Core, it's just a way to tell that it is the main (hence the word "core") library of ASP.NET Identity (pre-ASP.NET Core version). Since you are not using ASP.NET Core, you have to use Microsoft.AspNet.Identity.Core.
基本上,您有两种情况:
Basically, you have two scenarios:
- 无论您使用的是ASP.NET Core,在这种情况下都必须使用Microsoft.AspNetCore.Identity
- 或者您在使用ASP.NET Core之前的ASP.NET版本,并且必须使用Microsoft.AspNet.Identity.Core.
这篇关于Microsoft.AspNet.Identity.Core和Microsoft.AspNetCore.Identity有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!