简单会员提供者

发布于 2024-09-28 20:29:28 字数 568 浏览 2 评论 0原文

我正在使用新版本的 ASP.NET MVC3 并检查 WebSecurity 类。我已添加 System.Web.Webpages 作为参考,并且能够使用 WebSecurity 属性和方法,但是我试图了解如何在 ASP.NET 页面而不是由 WebMatrix 构建的页面内配置它。在 Webconfig 文件中,我确实注意到 AppSettings 部分中有一个名为 enableSimpleMembership 的新键,其值设置为“false”。将其更改为“true”似乎很简单,但是他们必须在 Webconfig 文件的membership\providers 部分中有一个 SimpleMembershipProvider。有没有人见过或尝试将 SimpleMembership 合并到 ASP.NET 页面中,并且有人知道如何将 SimpleMembershipProvider 添加到 webconfig 文件中吗?我引用了这个 但它似乎没有我正在寻找的所有信息。

I was working with the new version of ASP.NET MVC3 and examining the WebSecurity class. I've added System.Web.Webpages as a reference and am able to the use the WebSecurity properties and methods however i'm trying to understand how to configure it inside an ASP.NET page and not one built by WebMatrix. In the Webconfig file, I did notice in the AppSettings section, a new key called enableSimpleMembership with the value set to 'false'. Changing that to 'true' seemed trivial however they must have a SimpleMembershipProvider in the membership\providers section of the Webconfig file. Has anyone seen that or attempted to incorporate SimpleMembership inside an ASP.NET page and does anyone know about adding a SimpleMembershipProvider to the webconfig file? I have referenced this but it didn't seem to have all the information I was looking for.

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

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

发布评论

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

评论(2

¢好甜 2024-10-05 20:29:28

您应该能够简单地在 appSettings 中设置 enableSimpleMembership="true",然后删除对默认成员资格提供程序(例如 AspNetSqlMembershipProvider)的任何引用(它将为您注册)。

刚刚确认它适用于 MV3 RC 项目。

You should be able to simply set enableSimpleMembership="true" in appSettings and then remove any reference to a default membership provider such as AspNetSqlMembershipProvider (it will get registered for you).

Just confirmed that it works with an MV3 RC project.

時窥 2024-10-05 20:29:28

我创建了一个 NuGet 包以在 ASP.NET MVC3 中启用 SimpleMembership: http://nuget.org/List /Packages/SimpleMembership.Mvc3

这应该会自动执行所有步骤。

享受!

亚当

I created a NuGet package to enable SimpleMembership in ASP.NET MVC3: http://nuget.org/List/Packages/SimpleMembership.Mvc3

This should automate all the steps.

Enjoy!

Adam

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