0

Just wondering can you add this to any ASP.NET 4.5 project, or does it have to be an MVC one?

I like the idea of being able to use the customisation of SimpleMembership. Also are there any good tutorials or demos on how to add this to a project?

Thanks in advance

Alan

thatuxguy
  • 2,418
  • 7
  • 30
  • 51
  • SO is not a site where you ask for tutorials. However, there are many tutorials for ASP.NET membership, have you a specific question/problem? For example, what means _"customisation"_ in detail? – Tim Schmelter Apr 09 '13 at 11:52

2 Answers2

1

have a look at below links

SimpleMembership, Membership Providers, Universal Providers and the new ASP.NET 4.5 Web Forms and ASP.NET MVC 4 templates

http://weblogs.asp.net/jgalloway/archive/2012/08/29/simplemembership-membership-providers-universal-providers-and-the-new-asp-net-4-5-web-forms-and-asp-net-mvc-4-templates.aspx

using-simplemembership-with-asp.net-webpages

http://blog.osbornm.com/2010/07/21/using-simplemembership-with-asp.net-webpages/

JSJ
  • 5,653
  • 3
  • 25
  • 32
0

I would suggest you to use custom membership provider and custom role provider.

Just implement the System.Web.Security.MembershipProvider and System.Web.Secuiry.RoleProvider in your class. Then make your classes as default membership provider and role provider in you web.config file.

<system.web>
.
.
.
<membership defaultProvider="CustomMember">
    <providers>
        <add name="CustomMember" type="CustomMember" requiresQuestionAndAnswer="false" connectionString="your database connection string"/>
</providers>
</membership>

<roleManager enabled="true" defaultProvider="CustomRoleProvider" cacheRolesInCookie="true" cookieName=".ASPROLES" cookieTimeout="30" cookiePath="/" cookieRequireSSL="false" cookieSlidingExpiration="true" cookieProtection="All">
    <providers>
        <add name="CustomRoleProvider" type="CustomRoleProvider"/>
    </providers>
</roleManager>
.
.
.
</system.web>

Now you can use the Login control in you ASP.Net project and your application will do the rest.

th1rdey3
  • 4,176
  • 7
  • 30
  • 66