Sitefinity 4.0 Beta 2 custom membership provider

Posted by Community Admin on 03-Aug-2018 09:54

Sitefinity 4.0 Beta 2 custom membership provider

All Replies

Posted by Community Admin on 17-Nov-2010 00:00

Hi,


I am doing a PoC to replace sitefinity's membership provider with a custom one (which I assume should be very simple). We have a table of users in our database that I would like to use to login to backend (and potentially to some frontend pages)

I have seen mixed comments on the forum in regards to availability of this option. It has been mentioned in a few places that the only possibility for now is to inherit MembershipDataProvider (which is very practical as it depends on User). Is it possible in the beta?

Also it looks like sitefinity totally ignores my telerik -> security section in web.config:
  <telerik>
    <security defaultProvider="DefaultSecurityProvider" cmsProvidersName="DefaultSecurityProvider">
      <providers>
        <clear/>
        <add name="DefaultSecurityProvider"
             connectionStringName="Blah"
             type="Blah.class, BlahAssembly"
             membershipProvider="BlahProvider"
             roleProvider="Sitefinity"/>
      </providers>
    </security>
  </telerik>

Is this still supported/honored? Should I do this differently?

FYI, I have setup my custom provider in the system.web -> membership section of web config and I have registered my providers in securityconfig.config file.

What am I missing?

I would highly appreciate a quick response.

Thanks,
Mehdi

Posted by Community Admin on 17-Nov-2010 00:00

Sorry for the typo. It should read:

It has been mentioned in a few places that the only possibility for now is to inherit from MembershipDataProvider (which is very impractical as it depends on User).

Posted by Community Admin on 17-Nov-2010 00:00

Hello Mehdi,

We have MembershipProviderWrapper which is still not completed. The idea of MembershipProviderWrapper is to wrap standard ASP.NET provider to allow Sitefinity to work with third party membership providers that were not specifically designed for Sitefinity. This class is internal and you cannot use it directly but Sitefinity will automatically wrap all membership providers that are declared in web.config and they will become available in Sitefinity.

Currently the only way you have is creating a custom provider that inherits from MembershipDataProvider and implement it the Sitefinity way.

Greetings,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 17-Nov-2010 00:00

Thanks a lot for the response Ivan.


Could you please clarify the solution explained in this thread? For your convenience this is the part I am interested in:

"In order to configure a new membership or role provider you will need to go to Configurations->Security and add the membership and role providers under the respective sections. In the ProviderType field you will refer your provider type. Then when the provider is added you will need to expand its parameters section and add parameters you need, for example applicationName and set it to Custom/. Finally you need to restart the website. After this when you go to Users or Roles you will be able to create users and roles in your custom providers."

I did this but did not work!

Thanks,
Mehdi

Posted by Community Admin on 17-Nov-2010 00:00

Hi Mehdi,

Please refer the to attached screenshot that illustrates the section you should work with. Restart the application after you have added the provider. If it does not appear, then its type is not correct.

Best wishes,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 17-Nov-2010 00:00

Wow, I am quite impressed with the speed of response. Thanks.


That is where I changed and nothing happened. The new provider appears in the list, but the built-in one is still used when I login and when I create users. (I also have breakpoints on my custom provider which are not hit.)

Also, honestly I am a bit confused. So is it actually supported or not? I mean, can I create my custom membership provider and use it in V4.0 beta 2?

Thanks for your helps.

Posted by Community Admin on 17-Nov-2010 00:00

Hi Mehdi,

"Currently the only way you have is creating a custom provider that inherits from MembershipDataProvider" and implement it the Sitefinity way.

Regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 17-Nov-2010 00:00

Thanks for the response Ivan.


Would you know when this customisation point will be available? In other words, is there any release in the early future where I can use/inject a custom asp.net membership provider?

Regards,
Mehdi

Posted by Community Admin on 17-Nov-2010 00:00

Hello Mehdi,

I believe that we will finish the wrappers for the official release that we will have in January -2011

Regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 20-Jan-2011 00:00

Hi Ivan,

I'm using the release version and it seems not to be implemented.  Please can yo advise if this is the case (or am I just not doing it right!).

If not, when is it expected to be available please.

Thanks

Ian

Posted by Community Admin on 20-Jan-2011 00:00

Hi Mehdi,

The wrappers are not implemented and I am sorry to say that. I will update the post with some more information when we schedule the implementation.

Kind regards,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 24-Jan-2011 00:00

Hi

I'm looking at how to implement a provider inheriting MembershipDataProvider to manage a standard ASP.Net SQL Server Membership/Role provider 

The abstract class requires overrides for Create User, Delete, GetUser and GetUsers.  I'm probably being thick - but what do I need to do to handle login and logout?

Thanks

Ian

Posted by Community Admin on 24-Jan-2011 00:00

Hello,

We will have this out of the box with the Q1 release.

Regards,
Georgi
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 24-Jan-2011 00:00

Hi everyone, 
May be if it is possible to add and existing website (or a web application to a Sitefinity project) (I don't know if it is possible)
In case it is, may be one could use a custom provider in the website and use Sitefinity with its own provider. 
But before we make sure, to have the capability to add an existing solution to Sitefinity project.
So far, I haven't seen it, the only way to add an existing work is via the use of user control or custom control.
Please correct me if I am wrong.
I am here to learn :)

Posted by Community Admin on 27-Jan-2011 00:00

Hello xheo,

Sitefinity is entirely build on the provider model. We are not restricting you to add custom projects to the Sitefinity project as well. Could you please elaborate on your scenario, so we may guide you?

Kind regards,
Georgi
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 31-Mar-2011 00:00

Hi,

Regarding Georgi's comment above that mentions that a number of wrappers/features are being scheduled for Q1 to simplify custom membership provider implementation, are these still scheduled for Q1 and have they been added to any of the internal builds?
And if yes, where can we get more information regarding the interfaces to be implemented and the required configuration settings.

Thanks.

Posted by Community Admin on 31-Mar-2011 00:00

Hello AmrElsayed,

We are ready with the membership wrappers API and we will also have custom profiles implementation which is also missing in the 4.0 SP1. All new features will be released with Q1. In the service pack 1 we included only bug fixes.

All the best,
Ivan Dimitrov
the Telerik team

Posted by Community Admin on 19-Apr-2011 00:00

Hello Ivan,

We upgraded our website to Sitefinity 4.1
can you tell me please how can we use the "MembershipProviderWrapper " to extend the existing membership provider?

Thanks.

Posted by Community Admin on 20-Apr-2011 00:00

Hello AmrElsayed,

If you have an existing ASP.NET Membership provider you have to declare it in the web.config

<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>


Kind regards,
Ivan Dimitrov
the Telerik team


This thread is closed