+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Three Membership Providers

Three Membership Providers

2 posts, 0 answered
  1. Aaron
    Aaron avatar
    39 posts
    Registered:
    16 Apr 2009
    31 Aug 2009
    Link to this post
    We have need to use three different providers in one installation.    I have setup the web.config with the correct settings, and I can successfully switch membership providers within the ...sitefinity/admin/CmsAdmin/Users.aspx .

    The issue is that the list of roles on the ...sitefinity/admin/CmsAdmin/Users.aspx  page will only update for two providers out of the three.  It will update when I switch to the sitefinity provider and when I switch to one of my custom providers it only update if I'm switch to the custom provider that I have setup as the default provider in the web.config.  If I switch to one of the providers that is not sitefinity and not set as default the roles list is not update. 

    side note: The list of users always seems to update fine.

    Any thoughts?
    Here is this part of my web.config

        <roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="Keds_FirstStepsRole"
          <providers> 
            <clear /> 
            <add connectionStringName="DefaultConnection" applicationName="/" 
              name="Sitefinity" type="Telerik.DataAccess.AspnetProviders.TelerikRoleProvider, Telerik.DataAccess" /> 
              <add connectionStringName="keds" applicationName="/KEDS" 
               name="KedsRole" type="System.Web.Security.SqlRoleProvider" /> 
              <add connectionStringName="firststeps" applicationName="/KEDS_FirstSteps" 
               name="Keds_FirstStepsRole" type="System.Web.Security.SqlRoleProvider" /> 
          </providers> 
        </roleManager> 
        <membership defaultProvider="Sitefinity" userIsOnlineTimeWindow="15" hashAlgorithmType=""
          <providers> 
            <clear /> 
            <add name="Sitefinity" connectionStringName="DefaultConnection" type="Telerik.DataAccess.AspnetProviders.TelerikMembershipProvider, Telerik.DataAccess" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" passwordStrengthRegularExpression="" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" /> 
              
              <add connectionStringName="keds" enablePasswordRetrieval="false" 
               enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" 
               passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" 
               minRequiredNonalphanumericCharacters="0" applicationName="/KEDS" 
               name="kedsProvider" type="System.Web.Security.SqlMembershipProvider" /> 
     
              <add connectionStringName="firststeps" enablePasswordRetrieval="false" 
                         enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" 
                         passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" 
                         minRequiredNonalphanumericCharacters="0" applicationName="/KEDS_FirstSteps" 
                         name="FirstStepsProvider" type="System.Web.Security.SqlMembershipProvider" />         
          </providers> 
        </membership> 
        <profile defaultProvider="Sitefinity"
          <providers> 
            <clear /> 
            <add name="Sitefinity" connectionStringName="DefaultConnection" applicationName="/" type="Telerik.DataAccess.AspnetProviders.TelerikProfileProvider, Telerik.DataAccess" /> 
              <add name="kedsProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="keds" applicationName="/KEDS"/> 
              <add name="FirstStepsProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="firststeps" applicationName="/KEDS_FirstSteps"/> 
          </providers> 
          <properties> 
            <add name="FirstName" /> 
            <add name="LastName" /> 
            <add name="Position" /> 
            <add name="Photo_Hidden" /> 
            <add name="Photo" defaultValue="~/Sitefinity/Common/Images/defaultavatar.gif" /> 
            <group name="InstantMessenger"
              <add name="IM_Type" /> 
              <add name="IM_Value" /> 
            </group> 
            <group name="Phone"
              <add name="Value" /> 
              <add name="Type" /> 
            </group> 
          </properties> 
        </profile> 

  2. Aaron
    Aaron avatar
    39 posts
    Registered:
    16 Apr 2009
    31 Aug 2009
    Link to this post
    Ok figured out my issue.  Not a bug. I think I remember this being documented somewhere.  My RoleManager provider and a Membership providers names all need to correspond to each other. 

    here is what my working web.config looked like after i fixed it.

    <roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="kedsProvider"
        <providers> 
         <clear /> 
         <add connectionStringName="DefaultConnection" applicationName="/" 
          name="Sitefinity" type="Telerik.DataAccess.AspnetProviders.TelerikRoleProvider, Telerik.DataAccess" /> 
            <add connectionStringName="keds" applicationName="/KEDS" 
         name="kedsProvider" type="System.Web.Security.SqlRoleProvider" /> 
            <add connectionStringName="firststeps" applicationName="/KEDS_FirstSteps" 
             name="FirstStepsProvider" type="System.Web.Security.SqlRoleProvider" />     
             
        </providers> 
       </roleManager> 
          <membership defaultProvider="kedsProvider" userIsOnlineTimeWindow="15" hashAlgorithmType=""
              <providers> 
                  <clear/> 
                  <add name="Sitefinity" connectionStringName="DefaultConnection" type="Telerik.DataAccess.AspnetProviders.TelerikMembershipProvider, Telerik.DataAccess" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" passwordStrengthRegularExpression="" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0"/> 
                  <add connectionStringName="keds" enablePasswordRetrieval="false" 
                   enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" 
                   passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" 
                   minRequiredNonalphanumericCharacters="0" applicationName="/KEDS" 
                   name="kedsProvider" type="System.Web.Security.SqlMembershipProvider" /> 
     
                  <add connectionStringName="firststeps" enablePasswordRetrieval="false" 
                             enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" 
                             passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" 
                             minRequiredNonalphanumericCharacters="0" applicationName="/KEDS_FirstSteps" 
                             name="FirstStepsProvider" type="System.Web.Security.SqlMembershipProvider" /> 
              </providers> 
          </membership> 
          <profile defaultProvider="Sitefinity"
              <providers> 
                  <clear/> 
                  <add name="Sitefinity" connectionStringName="DefaultConnection" applicationName="/" type="Telerik.DataAccess.AspnetProviders.TelerikProfileProvider, Telerik.DataAccess"/> 
                  <add name="kedsProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="keds" applicationName="/KEDS"/> 
                  <add name="FirstStepsProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="firststeps" applicationName="/KEDS_FirstSteps"/> 
     
              </providers> 
              <properties> 
                  <add name="FirstName"/> 
                  <add name="LastName"/> 
            <add name="Position"/> 
            <add name="Photo_Hidden"/> 
            <add name="Photo" defaultValue="~/Sitefinity/Common/Images/defaultavatar.gif"/> 
            <group name="InstantMessenger"
              <add name="IM_Type"/> 
              <add name="IM_Value"/> 
            </group> 
            <group name="Phone"
              <add name="Value"/> 
              <add name="Type"/> 
            </group> 
              </properties> 
          </profile> 
     

2 posts, 0 answered