建设Asp.net MVC 3不使用的MembershipProvider的缺点 [英] Disadvantages of building an Asp.net mvc 3 without using MembershipProvider

查看:109
本文介绍了建设Asp.net MVC 3不使用的MembershipProvider的缺点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在那里不使用的MembershipProvider一个asp.net MVC 3应用程序除了具有自己写的一切根本弊端?我想知道,如果有更大的东西我失踪,这使得更加容易。

Are there any fundamental drawbacks to not using the MembershipProvider for an asp.net mvc 3 application besides having to write everything yourself? I'm wondering if there is something bigger I'm missing that it makes much easier.

请问授权属性控制器上的工作?

Would the authorize attribute work on controllers?

感谢。

推荐答案

AuthorizeAttribute决不依赖于ASP.NET成员资格。它只是着眼于 HttpContext.User中。任何有设置将正常工作。

AuthorizeAttribute is in no way dependent on ASP.NET membership. It just looks at the HttpContext.User. Anything which sets that will work.

最大的缺点,以做自己是大多数人,即使是专家,犯错误这样做。 授权是硬和它是,在最后,远不工作远近寻找一个现成的,现成的解决方案其作品比从<一个恢复href=\"http://www.technewsworld.com/story/Military-Meltdown-Monday---Not-Just-a-Catchy-Name-72855.html\"相对=nofollow>试图通过自己动手做国内新闻。

The biggest drawback to "doing it yourself" is that most people, even experts, make mistakes doing this. Authorization is hard, and it is, in the end, far less work to search far and wide for an off-the-shelf solution which works than to recover from making national news by trying to do it yourself.

如果你认为这样做会使您的事情更容易,那么你的几乎肯定低估了问题的范围。

If you think that doing this yourself makes things "much easier," then you are almost certainly underestimating the scope of the problem.

这篇关于建设Asp.net MVC 3不使用的MembershipProvider的缺点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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