Sitefinity 5.1 Custom Membership / Role Providers

Posted by Community Admin on 03-Aug-2018 14:47

Sitefinity 5.1 Custom Membership / Role Providers

All Replies

Posted by Community Admin on 27-Aug-2012 00:00

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

Posted by Community Admin on 31-Aug-2012 00:00

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">      
    <providers>
        <clear/>
        <add name="Custom" type="CustomType, CustomType, etc" />
    </providers>
</roleManager>
<membership defaultProvider="Default">
    <providers>
        <clear />
        <add name="Default" type="Telerik.Sitefinity.Security.Data.SitefinityMembershipProvider, Telerik.Sitefinity" />            
        <add name="Custom" type="CustomType, CustomType, etc." />
    </providers>
</membership>

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.

Posted by Community Admin on 11-Oct-2013 00:00

Juan.

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.

Thanks.

Posted by Community Admin on 16-Oct-2013 00:00

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,
DimBo
Telerik

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

This thread is closed