对于MVC4会员系统支持RavenDB [英] Membership systems for MVC4 that support RavenDB

查看:142
本文介绍了对于MVC4会员系统支持RavenDB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创造了很多快速MVC应用概念证明,我居然发现,与MVC4模板运SimpleMembership提供商是非常方便的,因为它让我起来,具有用户注册和运行放大器;的OAuth在几分钟之内

I create a lot of quick "proof of concept" MVC apps and I actually found the SimpleMembership provider that shipped with the MVC4 templates to be very handy since it gets me up and running with user registration & OAuth in a matter of minutes.

但是......我开始使用RavenDb(上RavenHQ了很多关于我的项目)。于是,我开始试图实现基于ExtendedMembershipProvider我自己的自定义成员资格提供者,而这样做,我才意识到这并没有太大的意义。
后来我在试图解决这一确切的问题2有趣的项目跌跌撞撞:

But...I've started to use RavenDb (on RavenHQ for a lot for my projects). So, I starting trying to implement my own "custom membership provider" based on the ExtendedMembershipProvider and while doing that I realized that didn't make much sense. I later stumbled upon 2 interesting projects that try to solve this exact problem:


  • WorldDomination.Web.Auth:<一href=\"https://github.com/PureKrome/WorldDomination.Web.Authentication\">https://github.com/PureKrome/WorldDomination.Web.Authentication

  • MemFlex: https://github.com/OdeTo$c$c/Memflex

  • WorldDomination.Web.Auth: https://github.com/PureKrome/WorldDomination.Web.Authentication
  • MemFlex: https://github.com/OdeToCode/Memflex

两者都是pretty有趣的最近的努力,并想知道,如果这些正在兴建,现在唯一的问题。我基本上是在寻找的NuGet PKG,我可以拖放到MVC4应用程序,连接到我的RavenDb和完成。我愿意建立这个东西,但不想重复那些已经在运动中的任何努力。
THX!

Both are pretty interesting recent efforts and was wondering if these are the only ones being built right now. I'm essentially looking for nuget pkg that I can drop into a MVC4 app, connect to my RavenDb and be done. I'm willing to build this thing but don't want to duplicate any efforts that are already in motion. Thx!

推荐答案

有几个ASP.Net成员资格提供了RavenDB。他们都不是官方的,他们都略有不同的实现。谷歌ravendb会员提供者,你会发现很多的。

There are several ASP.Net membership providers for RavenDB. None of them are official, and they all have slightly different implementations. Google for "ravendb membership provider" and you will find many.

这是一个很好的文章<一个href=\"http://mytechworld.officeacuity.com/index.php/2012/07/authentication-and-authorization-in-mvc-projects-using-ravendb/\"相对=nofollow>这里比较其中的一些与掠夺自己的授权和认证捆绑。

There is a good article here comparing a few of them with Raven's own authorization and authentication bundles.

我同意你的看法,它应该是更容易换出SQL为乌鸦的各种MVC4模板。然而,除了依靠会员供应商,他们往往有设计有实体框架的工作模式。如果你与RavenDB从头开始编写示例模板记住,你可能有一个非常不同的最终产品。

I agree with you that it should be easier to swap out SQL for Raven on the various MVC4 templates. However, in addition to relying on the membership provider, they tend to have models that are designed to work with Entity Framework. If you were to write the sample templates from scratch with RavenDB in mind, you'd probably have a very different final product.

更新

我不知道你在谈论新的 SimpleMembershipProvider 。我不知道这存在。我发现<一个href=\"http://weblogs.asp.net/jgalloway/archive/2012/08/29/simplemembership-membership-providers-universal-providers-and-the-new-asp-net-4-5-web-forms-and-asp-net-mvc-4-templates.aspx\"相对=nofollow>乔恩·加洛韦的文章描述它的细节 - 一个伟大的阅读。他指出,有关这里的两个关键点。我引述如下:

I didn't realize you were talking about the new SimpleMembershipProvider. I wasn't aware this existed. I found Jon Galloway's article describing it in detail - a great read. He points out two key points that are relevant here. I quote:

注意SimpleMembership仍然需要SQL Server的一些味道 - 它不会与MySQL,NoSQL数据库的工作,等等。你可以使用工具来看看在WebMatrix.WebData.dll的code像ILSpy如果你想知道为什么 - 在有些情况下正在执行SQL Server特定的SQL语句的地方,尤其是创建和初始化表时。好像你也许可以用另一个数据库,如果你创建的表分开工作,但我还没有尝试过,它不是在这一点上的支持。

...

在这里带走重要的是,SimpleMembershipProvider是的MembershipProvider,但的MembershipProvider不是SimpleMembershipProvider。
  这种区别在实践中很重要:你不能使用现有的MembershipProvider(包括System.Web.Providers发现通用供应商)与需要SimpleMembershipProvider,包括任何在WebMatrix.WebData.WebSecurity或Microsoft.Web调用的一个API。 WebPages.OAuth.OAuthWebSecurity。

我会聚集那么写 SimpleMembershipProvider 为RavenDB是不可能的。

I would gather then that writing a SimpleMembershipProvider for RavenDB would not be possible.

这篇关于对于MVC4会员系统支持RavenDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆