Try Now
More in this section

Forums / General Discussions / Sitefinity 5.1 Custom Membership / Role Providers

Sitefinity 5.1 Custom Membership / Role Providers

4 posts, 0 answered
  1. Juan
    Juan avatar
    5 posts
    27 Jan 2011
    27 Aug 2012
    Link to this post
    Hello, I'm trying to implement a custom membership / role providers in Sitefinity 5.1 to validate users against an external MS CRM server.

    I've read a lot of posts but it still not clear for me how to proceed. I just need my widgets to have access to my custom providers through Membership.Providers as usual.

    1) What classes should I inherit from?
    2) Where should I register my dlls? (web.config, security.config, both)
    3) Please point me to any suitable example for SF 5.1

    Any help would be appreciated.

    Thanks in advance
  2. Juan
    Juan avatar
    5 posts
    27 Jan 2011
    31 Aug 2012
    Link to this post
    I didn't know this was such a difficult issue on SF. My team implemented the same solution in several CMSs like Sharepoint, DotNetNuke, Kentico, Sitecore, etc. In Sitefinity things are not going so well which is a pitty because I think it's a wonderful product.

    I'll recap on my progress to see if SOMEONE can help me a little bit.

    I usually add both membership provider and role provider to web.config file as the non-default providers and then I instantiate them through RoleProviderCollection and MembershipProviderCollection etc.

    In SF, I was able to add both: my custom membership provider and role provider to web config but I had to enable the role manager section (disabled by default) and make my role provider the default one.

    <roleManager enabled="true" defaultProvider="Custom">      
            <add name="Custom" type="CustomType, CustomType, etc" />
    <membership defaultProvider="Default">
            <clear />
            <add name="Default" type="Telerik.Sitefinity.Security.Data.SitefinityMembershipProvider, Telerik.Sitefinity" />            
            <add name="Custom" type="CustomType, CustomType, etc." />

    With this I was able to make my widgets work as expected, connecting to the external CRM server retrieving and saving data. But I got some undesired effects on the administration site:

    - The log in page (of the Admin site) offers a new dropdown letting the user choose the membershipprovider they want to authenticate with.
    - Enabling the role manager section in web.config seems to brake the User administration page: With the Default membership provider selected (not the custom one) the page keeps loading forever.

    So, again I'll ask for your help on this subject. Any help would be appreciated.

    - Should I change the approach somehow? (my providers doesn't implement every single method, just those needed by my components)
    - Do I need to register my providers through security.config file? (Administration --> Settings --> Advanced --> Security --> Role Providers / Membership Providers?) What are these settings for?
    - Is there any clear documentation related of implementing custom membership / role providers on SF 5.1? I've read a lot of post that seems to be outdated.

    Thanks in advance.
  3. Kedar Periyapatna
    Kedar Periyapatna avatar
    3 posts
    31 Dec 2009
    11 Oct 2013 in reply to Juan
    Link to this post

    Any response yet? I tool am looking to do something similar.

    1. set of users who will be using sitefinity to configure stuff. And they have sitefinity "Default" role  anager and membership provider
    2.set of users who will be actually using the site. I have custom membership provider ( assuming that I need custom role manager as well for this, with the same name).. which does all the login information through "web services" (instead of external database)

    Its not very clear how to differentiate these two things and didn't find much resource online as well.

  4. Dimitar
    Dimitar avatar
    19 posts
    30 Aug 2016
    16 Oct 2013
    Link to this post
    Hi Kedar & Juan,

    Your cases could be set up. You could take a look in the official documentation here in order to understand how to create a custom membership provider, where to register it etc.
    If you follow the steps (e.g. the ones from the tutorial) and if you still have questions - don't hesitate to ask.

    Have a nice day,
    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
4 posts, 0 answered