问题:使用 SQL Membership Provider 进行身份验证

发布于 2024-09-02 17:55:17 字数 268 浏览 3 评论 0原文

我检查了以下有关如何使用 sqlMembershipProvider 的文章。我的问题是,这是大多数 ASP.NET 应用程序身份验证方案的实现方式吗?

还有其他方法吗,任何参考资料都会对我很有帮助。

编辑1: 我的目的是了解其他可能的方法,我可以根据标准数据库对用户进行身份验证。

I have checked the following article on how to use the sqlMembershipProvider. My question, is this the way most of the asp.net applications authentication schemes implemented.

Is there any other method, any references will be quite helpful for me.

Edit1:
My intention is to know the other possible ways, I can authenticate a user against a standard database.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

苄①跕圉湢 2024-09-09 17:55:17

不幸的是,“大多数”很难量化。

MSFT 使使用 SqlMembershipProvider 进行开箱即用的设置来设置 ASP.NET 应用程序变得非常容易,从而可以非常轻松地针对正在运行的 SQL 数据库进行身份验证。

也就是说,我自己推出了,因为我不需要太多内置功能的功能。

我的方法是编写自己的成员资格提供程序类,并使用 web.config 指定我的 customprovider 是默认的成员资格提供程序。

对于 ASP,还有其他进行身份验证的方法,例如使用 NTLM(基本上为每个 Web 用户创建 Windows 用户,并使用 Windows 内置身份验证)。

简短回答:如果您可以使用 SqlMembershipProvider,并且它可以满足您所需的所有功能,那么我建议使用它。

"Most" is unfortunately hard to quantify.

MSFT has made it easy to setup an ASP.NET application using SqlMembershipProvider for an out-of-the-box setup, making it super easy to get authentication against a SQL db working.

That said, I rolled my own, because I didn't need much of what the built-in stuff was doing.

The way I did it was to write my own membership provider class, and use the web.config to specify that my customprovider was the default membership provider.

For ASP, there are other ways of doing authentication, such as using NTLM (basically creating windows users for each web user, and using Windows built in authentication).

Short answer: If you can make use of SqlMembershipProvider, and it does all that you need, then I recommend using it.

只涨不跌 2024-09-09 17:55:17

我认为@Alan (+1) 提出了很好的观点。

在简单的层面上,如果您使用的(可信)框架为您提供了一个需要配置而不是编码的解决方案,并且它满足您的需求,除非有令人信服的案例反对它,那么它可能是一个很好的解决方案。

您不会在 asp.net 中编写新的文本框控件,也不会为 jQuery 编写新的 fadeOut 方法 - 您将使用提供的解决方案。

多年来,我在这个领域自行开发并使用了各种插件和第三方。但在我目前正在进行的项目中,我们需要在上周二进行用户身份验证,并且通过 SqlMembershipProvider,安全模块在周三完成。这对我来说已经足够好了!

I reckon @Alan (+1) makes good points.

On a simple level if the (trusted) framework you are using offers you a solution that needs configuring rather than coding and it covers your needs unless there is a compelling case against it then it is probably a good solution.

You wouldn't write a new textbox control in asp.net, or a new fadeOut method for jQuery - you would use the provided solution.

I've rolled-my-own in this area and used all kinds of plug-ins and third-parties over the years. But in the project I'm currently working on we needed user authentication on Tuesday of last week and with SqlMembershipProvider the security module was complete by Wednesday. That's good enough for me!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文