NET身份2支持匿名用户

NET身份2支持匿名用户

本文介绍了请问ASP.NET身份2支持匿名用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想允许匿名/尚未注册和注册用户发布在我的网站。

I want to allow anonymous/not yet registered and registered users to post on my website.

Posts (table)
- Id (int)
- Subject (nvarchar)
- Body (nvarchar)
- UserId (uniqueidentifier)

该项目采用了最新质谱技术(ASP.NET MVC 5+,C#...)我应该如何去这样做?

The project uses the latest MS technologies (ASP.NET MVC 5+, C#...) How should I go about doing that?

是ASP.NET身份甚至是正确的解决方案?

Is ASP.NET Identity even the right solution?

什么是它们之间的区别是:

What's the difference between these:


      
  • ASP.NET身份

  •   
  • SimpleMembership

  •   
  • 会员提供

  •   

更新
我需要能够区分尚未注册用户,并记录他们的贴子在数据库中。

UpdateI need to be able to differentiate not yet registered users and record their postings in the database.

更新2
然后不得不迁移到一个注册帐户的选项。就像计算器如何使用允许匿名用户。
事情是这样的,但兼容ASP.NET Identitfy
http://msdn.microsoft.com/en-us/library/ewfkf772(v=vs.100).aspx

推荐答案

ASP.NET身份是ASP.NET验证的最新版本。这是predecessor是SimpleMembership,这本身就是改善老ASP.NET验证的尝试。成员资格提供不是一个单独的一种认证系统,但相反,一种方法来引导ASP.NET验证或SimpleMembership具有附加功能。如果你没有覆盖的默认特定登录的情况下,你可以创建一个成员提供程序,将允许ASP.NET与该系统界面。

ASP.NET Identity is the newest revision of authentication in ASP.NET. It's predecessor was SimpleMembership, which itself was an attempt to improve on the old ASP.NET Auth. Membership providers are not a separate kind of authentication system, but instead, a way to bootstrap ASP.NET Auth or SimpleMembership with additional functionality. If you had a particular login scenario not covered by the defaults, you could create a membership provider that would allow ASP.NET to interface with that system.

ASP.NET身份将取代一切,并没有采用会员供应商。相反,它提供了身份验证的非常扩展的基础,通过使用标准的API允许您自定义的pretty验证多少你喜欢的任何方式。它也有OAuth的和更强大的支持外接登入供应商,并与东西如Active Directory,尤其是Azure的版本在云界面更好。

ASP.NET Identity supercedes everything else, and does not use membership providers. Instead, it's provides a very extensible foundation for authentication that through the use of standard APIs allows you to customize authentication in pretty much any way you like. It also has much more robust support for OAuth and external signin providers, and interfaces better with things like Active Directory, especially the Azure version in the cloud.

如果你开始一个新的项目与身份去了。说,它仍将是可预见的未来是有点危险,在过去微软似乎风味的最周的方法来验证,但是从我个人的经验与它的工作,他们似乎终于得到了它的权利。我想你只看到改进和改进前进,而不是完整的替代品。

If you're starting on a new project go with Identity. Saying that it will remain for the forseeable future is a bit dangerous with Microsoft's seeming flavor-of-the-week approach to authentication in the past, but from my personal experience working with it, they seem to have finally gotten it right. I think you'll only see refinements and improvements going forward, rather than complete replacements.

这篇关于请问ASP.NET身份2支持匿名用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 07:18