开发者

SimpleMembershipProvider

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 开发者_如何学JAVAto 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.


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜