Membership systems for MVC4 that support RavenDB

ε祈祈猫儿з 提交于 2019-12-02 19:31:32

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.

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

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.

Update

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:

Note that SimpleMembership still requires some flavor of SQL Server - it won't work with MySQL, NoSQL databases, etc. You can take a look at the code in WebMatrix.WebData.dll using a tool like ILSpy if you'd like to see why - there are places where SQL Server specific SQL statements are being executed, especially when creating and initializing tables. It seems like you might be able to work with another database if you created the tables separately, but I haven't tried it and it's not supported at this point.

...

The important thing to take away here is that a SimpleMembershipProvider is a MembershipProvider, but a MembershipProvider is not a SimpleMembershipProvider. This distinction is important in practice: you cannot use an existing MembershipProvider (including the Universal Providers found in System.Web.Providers) with an API that requires a SimpleMembershipProvider, including any of the calls in WebMatrix.WebData.WebSecurity or Microsoft.Web.WebPages.OAuth.OAuthWebSecurity.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!