BlogEngine.NET Screencast: SQL Membership and Roles Providers

SQLMembership The third screencast in my recent series is a walk through of setting up the SQL Membership and Roles providers in place of the default XML versions.  These SQL providers are built-in to the .NET 2.0 framework and are not BlogEngine.NET components.  BlogEngine.NET was designed to allow using these providers however and is fully supported.

This screencast is a bit longer than the previous two as I start without the membership and roles services in a database and walk you through creating these, checking permissions, setting up your web.config to use them and adding your initial roles and users in the database.

As before, it is available in both an in page flash version and Windows Media Video format.

Here is the web.config updates (for those interested):


<membership defaultProvider="SqlMembershipProvider" >
        <clear />
        <add name="XmlMembershipProvider"
             type="BlogEngine.Core.Providers.XmlMembershipProvider, BlogEngine.Core"
             description="XML membership provider"
        <add name="SqlMembershipProvider"
             applicationName = "BlogEngine"/>

    <roleManager defaultProvider="SqlRoleProvider" enabled="true"
                 cacheRolesInCookie="true" cookieName=".BLOGENGINEROLES">
        <clear />
        <add name="XmlRoleProvider"
             type="BlogEngine.Core.Providers.XmlRoleProvider, BlogEngine.Core"
             description="XML role provider"
        <add name="SqlRoleProvider"
             applicationName = "BlogEngine"/>


I stress in the screencast, these are the basic entries and lots of options could be added in.  These will get you on the right track however.

In case you missed it above, the links to the screencasts are here:

    <li><a href="/misc/BE13SQLMembership.html">Flash version</a> </li>    
    <li><a href="/misc/BE13SQLMembership.wmv" onclick="javascript:urchinTracker ('/downloads/map'); ">Windows Media Video format</a> </li>