我应该使用内置的成员资格提供对ASP .NET MVC应用程序? [英] Should I use the built-in membership provider for an ASP .NET MVC application?

查看:109
本文介绍了我应该使用内置的成员资格提供对ASP .NET MVC应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用了我的所有Web应用程序的形式验证的定义成员资格提供至今。我即将开始使用MVC开发我的第一个网站。我想知道如果我我应该用附带的ASP .NET MVC,或者我是否应该创建自己内置的成员资格提供程序。我的网站需要使用OpenID,Facebook,谷歌等进行身份验证和openauth为API访问集成。我想知道这将是多么容易使用内置于一体,为我的需求。

I've been using a custom membership provider for authentication in all my web form applications till now. I'm about to start developing my first website using MVC. I'm wondering if I should I use the built-in membership provider that ships with ASP .NET MVC, or if I should create my own. My site needs to integrate with openid, facebook, google etc for authentication and openauth for api access. I'm wondering how easy it would be to use the built-in one for my needs.

推荐答案

我个人的的使用 ASP.NET成员资格提供这是可用在核心框架...的当它持续到SQL SERVER数据库的。所有表和视图是一个网站这样的矫枉过正。对于一个托管公司? ..也许......但所有的企业网站我做过..它已经这么fraking矫枉过正和麻烦。至于实际的提供者接口,等等...这是非常好的..但还是很硬派等简单中小网站矫枉过正,海事组织。

Personally, I hate using the ASP.NET Membership provider that's available in the core framework ... when it persists to a SQL SERVER database. All the tables and views are such an overkill for a single website. For a hosting company? .. maybe ... but for all the enterprise sites I've done .. it's been such a fraking overkill and hassle. As to the actual provider interface, etc ... it's very good .. but still very hardcore, etc. An overkill for simple-medium sites, IMO.

所以个人,我会用一些简单的定制code办理会员持久性最基本的介质网站。

So personally, I would use some simple custom code to handle membership persistence for most basic-medium websites.

这则塞格斯你的第二个问题:的OpenID。使用安德鲁阿诺特的 DotNetOpenAuth .NET框架 - >它litterally踢屁股严重(TM)。使用这种独立于如何在用户的会员数据保存到存储库。 IE浏览器。如果你继续和使用SQL Server + ASP.NET会员供应商,你仍然可以(也应该)使用DotNetOpenAuth。如果你有一个简单的自定义的方式对用户的详细信息保存到数据库中(这是我做的),你也仍然可以使用DotNetOpenAuth - 二者是相互独立的。

This then segues to your second question: OpenId. Use Andrew Arnott's DotNetOpenAuth .NET framework -> it litterally Kicks Serious Ass (tm). Using this is independent of HOW you save the user membership data to a repository. Ie. if you go ahead and use the Sql Server + ASP.NET Membership provider, you can still (and should) use DotNetOpenAuth. If you have a simple, custom way to save user details to a database (which is what I do), you can also still use DotNetOpenAuth -- the two are independent of each other.

所以,国际海事组织,不要使用过于复杂外ASP.NET成员+ SQL服务器的东西,但一个简单的表或两个保存自己的用户的详细信息。接下来,您必须使用DotNetOpenAuth任何东西的OpenID(计算器使用DotNetOpenAuth来处理自己的OpenID登录)。

So, IMO, don't use the overcomplicated ASP.NET Membership + Sql Server stuff but a simple table or two to save your own user details. Next, you MUST use DotNetOpenAuth for any OpenId stuff (StackOverflow uses DotNetOpenAuth to handle their OpenId login).

好运:)

(我敢肯定,我的ASP.NET成员提供商+的SQL Server opnions坚持这些信息会引起一些人的书呆子 - 愤怒,在这里)。

(I'm sure my opnions of the ASP.NET Membership provider + Sql Server to persist that info will cause a few people to nerd-rage, here).

这篇关于我应该使用内置的成员资格提供对ASP .NET MVC应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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