asp.net-mvc ASP.NET Identity 与简单成员资格的优缺点?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21207246/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ASP.NET Identity vs Simple membership Pros and Cons?
提问by Flood Gravemind
In MVC4 we had Simple Membership. My opinion is that Simple Membership was a good Identity Model tried and tested with good documentation and didn't need to be fixed but simply needed an upgrade in terms of Email Verification/ Password Resetand all other stuff that we normally have to deal with when building an app. However the new ASP.NET Identity model seems achieve Something of sorts that Vista achieved over XP. I mean AspnetUserClaimsand AspnetLoginscould have been bunched together as UserAliases. And Microsoft should have provided some methods for the Email part of my babble. Having just discussed my opinion based on first looks which might be deceiving my question is
在 MVC4 中,我们有Simple Membership。我的观点是,Simple Membership 是一个很好的身份模型,经过良好的文档尝试和测试,不需要修复,只需要在电子邮件验证/密码重置以及我们通常必须处理的所有其他事情方面进行升级构建应用程序。然而,新的 ASP.NET Identity 模型似乎实现了 Vista 在 XP 上实现的某种程度。我的意思是AspnetUserClaims并且AspnetLogins可以作为UserAliases. 微软应该为我胡言乱语的电子邮件部分提供一些方法。刚刚根据可能会欺骗我的问题的第一眼讨论了我的意见是
I am trying to decide whether I should move from Simple Membershipto the new ASP.NET Identitybut since documentation and tests of ASP.NET Identity model is sparse, conflicting and hard to locate using Google. So can someone with experience of both please summarize the pros and cons?
我正在尝试决定是否应该从Simple Membership转移到新的 ASP.NET Identity,但由于 ASP.NET Identity 模型的文档和测试很少、相互冲突且难以使用 Google 定位。那么有经验的人可以总结一下优缺点吗?
采纳答案by Kevin Junghans
@Roman references some good articles that looks at the pros and cons of ASP.NET Identity and the membership provider model.
@Roman 引用了一些很好的文章,这些文章介绍了 ASP.NET Identity 和成员资格提供程序模型的优缺点。
ASP.NET Identity gets away from the membership provider model, which I believe is a good thing. There are some definite problems with Simple Membershipwhen you wanted more advanced security features and if it was anything more than "simple" you ended up creating your own security solution. I am moving forward with ASP.NET Identitybecause it much more extensible than Simple Membershipand although the documentation and support is weak right now I believe it will get better as it matures, just like Simple Membershipdid. If you can get past the growing pains I believe ASP.NET Identitywill be a far better solution than Simple Membershipwas and I like the tight integration with OWIN, which will be important going forward. As for email verification with ASP.NET Identity, here is an article that describes how to implement this. You can get complete source code here. And the solution described here also provides password reset with ASP.NET Identity.
ASP.NET Identity 脱离了成员资格提供程序模型,我认为这是一件好事。当您想要更高级的安全功能时,Simple Membership存在一些明确的问题,如果它不仅仅是“简单”,您最终会创建自己的安全解决方案。我正在推进ASP.NET Identity,因为它比Simple Membership更具可扩展性,尽管目前文档和支持还很薄弱,但我相信随着它的成熟,它会变得更好,就像Simple Membership一样。如果你能克服成长的痛苦,我相信ASP.NET Identity将是一个比Simple Membership更好的解决方案,我喜欢与OWIN,这将是重要的未来。至于使用ASP.NET Identity进行电子邮件验证,这里有一篇文章介绍了如何实现这一点。您可以在此处获得完整的源代码。此处描述的解决方案还提供了使用 ASP.NET Identity 重置密码的功能。
回答by Roman Pushkin
As for me, they are all quite far from being perfect. Check these out:
对我来说,他们都离完美还很远。检查这些:
So I prefer to use MembershipReboot.
所以我更喜欢使用MembershipReboot。
EDIT: (May 2018). Brock Allen of MembershipReboothas the following, to say on the Project site.
编辑:(2018 年 5 月)。Brock AllenMembershipReboot有以下内容,在项目网站上说。
As of 2017 MembershipReboot will no longer be maintained. It has served its purpose, and ASP.NET Identity has finally caught up (and surpassed) this library in terms of security and functionality. If you are interested in taking over maintenance, let me know.
自 2017 年起,将不再维护 MembershipReboot。它已经达到了它的目的,ASP.NET Identity 终于在安全性和功能性方面赶上了(并超过)了这个库。如果您有兴趣接管维护,请告诉我。

