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

Forums / Developing with Sitefinity / Using the SitefinityMembershipProvider

Using the SitefinityMembershipProvider

2 posts, 0 answered
  1. Pierre Chew
    Pierre Chew avatar
    4 posts
    Registered:
    08 Aug 2012
    15 Aug 2011
    Link to this post
    Hello,

    I am looking for some documentation on how to setup the SitefinityMembershipProvider.  We have several asp.net applications (currently using Asp.Net Membership Provider) that are integrated into our public website and now that we are using Sitefinity for the public web site, we want to unify them with a single sign on system.

    I can't seem to find the setup instructions on how to add the SitefinityMembershipProvider to my asp.net application.  Through trial and error I have figured out how to modify the web.config to point to the SitefinityMembershipProvider.  I have also added Sitefinity as a connection string to my connection string section.  I also added a the SEcurityConfig.config file to the Apps/Sitefinity/Configuration section. 

    Is there another file that I am missing?

    Thanks,

    Pierre
  2. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    16 Aug 2011
    Link to this post
    Hello Pierre Chew,

    Here are some detailed instructions on how to add a membership provider:

    1. Create a database that will hold the membership users using aspnet_regsql.exe or use and existing one
    2. Add a connection string to the web.config file that points to this database
    3. Add the following settings to the web.config file to indicate you want to use additional ASP.NET membership and/or role providers:
     
    <system.web>
        <connectionStrings>
            <add name="SqlMembership" connectionString="data source=localhost;UID=sa;PWD=password;initial catalog=Membership" providerName="System.Data.SqlClient" />
        </connectionStrings>
     
        <roleManager enabled="true">
            <providers>
                <clear/>
                <add name="AspNetSqlRoleProvider" connectionStringName="SqlMembership" applicationName="/" type="System.Web.Security.SqlRoleProvider" />
            </providers>
        </roleManager>
     
        <membership>
            <providers>
                <clear />
                <add connectionStringName="SqlMembership" enablePasswordRetrieval="false"
                    enablePasswordReset="true" requiresQuestionAndAnswer="false"
                    requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6"
                    minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
                    applicationName="/" name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" />
            </providers>
        </membership>
     
    ...
     
    Here in the <membership><providers><add> element the connectionStringName is the connection string you added in step 2
     
    4. The membership provider in the <membership> element should appear in a dropdown list on the backend login page allowing you to select it to login to the backend

    All the best,
    Lubomir Velkov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered