EPiWiki.se  - EPiServer notes shared with others
 

EPiServer Community Membership

[Edit]
EPiServer community has to have all users in the community database, this mean that we can’t use the normal ASP.NET membership providers directly. If we want use CMS together with the community we have to use a wrapper for the page provider that handle storage in this tables (the default community page provider don’t let the users change passwords in community 4).
Toms more detailed blog post about EPiServer community membership configuration

Example


This example uses the default ASP.NET SqlMemberShipProvider together with EPiServer Community and CMS.

<roleManager
      enabled="true"
      cacheRolesInCookie="true"
      defaultProvider="EPiServerCommonRoleProvider">
   <providers>
      <clear />
      <add connectionStringName="EPiServerDB"
           applicationName="EPiServerSample"
           name="SqlServerRoleProvider"
           type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      <add name="EPiServerCommonRoleProvider"
           applicationName="EPiServerCommonApplication"
           type="EPiServer.Common.Web.Authorization.RoleProvider,
           EPiServer.Common.Web.Authorization" />

   </providers>
</roleManager>
<membership
      defaultProvider="EPiServerCommonIntegrationMembershipProvider"
      userIsOnlineTimeWindow="10">
   <providers>
      <clear />
      <add name="SqlServerMembershipProvider"
           type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
           connectionStringName="EPiServerDB"
           requiresQuestionAndAnswer="false"
           applicationName="EPiServerSample"
           requiresUniqueEmail="true"
           passwordFormat="Hashed"
           maxInvalidPasswordAttempts="5"
           minRequiredPasswordLength="7"
           minRequiredNonalphanumericCharacters="0"
           passwordAttemptWindow="10"
           passwordStrengthRegularExpression="" />
        
      <add name="EPiServerCommonIntegrationMembershipProvider"
           applicationName="EPiServerCommonApplication"
           type="EPiServer.Common.Web.Authorization.IntegrationMembershipProvider, EPiServer.Common.Web.Authorization"
           provider="SqlServerMembershipProvider"
           roleToSynchronize1="*" />
   </providers>
</membership>

Can’t login after adding the correct configuration


The IIS has to be restarted.
Logout and login again to the web site to sync roles.
Sometimes you have to add roles to the community, this can be done by
1) adding a role named “Administrators”
2) add a user to it
3) go to the Community admin interface and manage you roles
4) remove the “Administrators” role from the site
Version author:
Mattias Lövström

EPiServer version

All