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

Forums / Developing with Sitefinity / MembershipProvider.GetAllUsers PageSize

MembershipProvider.GetAllUsers PageSize

8 posts, 1 answered
  1. Benjamin
    Benjamin avatar
    6 posts
    Registered:
    30 Jan 2008
    10 Jul 2009
    Link to this post
    I've implemented a custom MembershipProvider. When I pull up the users page the page size sent to the provider is set to the max for integer. This will end up returning +100k users, which is unacceptable. 

    I checked the "~/sitefinity/admin/CmsAdmin/users.aspx" for the page size. It's set to 20. Is there some other setting I need to change to ensure paging for the users page?

    Thanks,
    Ben
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    10 Jul 2009
    Link to this post
    Hello Benjamin,

    Changing the GridView paging will do the trick. Note that if you have large numbers of users which you want to show in the Grid, this could slow it. To optimize this process you could inherit from your membership provider ( let's say SqlMembershipProvider) and IExtendedMembershipProvider interface. Then call GetAllUsers method.

    using System.Web.Security;  
    using Telerik.Framework.Security;  
      
    public class MyMembershipProvider : SqlMembershipProvider, IExtendedMembershipProvider  
    {  
        public MembershipUserCollection GetAllUsers(int from, int maxRows, string sortExpr, out int totalRows)  
        {  
            return base.GetAllUsers(from, maxRows, out totalRows);  
        } 
     
    .... 
       .... 
          .....  


    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Benjamin
    Benjamin avatar
    6 posts
    Registered:
    30 Jan 2008
    20 Jul 2009
    Link to this post
    WHich assembly is the IExtendedMembershipProvider located?
  4. Benjamin
    Benjamin avatar
    6 posts
    Registered:
    30 Jan 2008
    20 Jul 2009
    Link to this post
    Let me ellaborate,

    I tried importing Telrik.Framework.Security, but that namespace doesn't exist in the Telrik.Framework.dll. So I imported all the Telrik Assemblies and searched for the IExtendedMembershipProvider interface and didn't find it.

    Thanks,
    Ben
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    21 Jul 2009
    Link to this post
    Hello Benjamin,

    Here is the namespace Telerik.Framework.Security.IExtendedMembershipProvider

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Benjamin
    Benjamin avatar
    6 posts
    Registered:
    30 Jan 2008
    21 Jul 2009
    Link to this post
    That namespace doesn't exist in the Telerik.Framework.dll. Does it exist in some other DLL? In the object browser, these are the only namespaces I see in the Telerik.Framework.dll:

    Telerik
    Telerik.Cms
    Telerik.Cms.Web
    Telerik.Cms.Web.UI
    Telerik.Framework
    Telerik.Framework.Configuration
    Telerik.Framework.Rss
    Telerik.Framework.Search
    Telerik.Framework.Utilities
    Telerik.Framework.Utilities.HtmlParser
    Telerik.Framework.Web
    Telerik.Framework.Web.Design
    Telerik.Utilities
    Telerik.Utilities.Reflection
    Telerik.Web
    Telerik.Zip

    I've also run a search on all the assemblies located in the Sitefinity bin directory and didn't find the interface. I also could not find the interface or the Telerik.Framework.Security namespace in the API documentation located at : http://www.sitefinity.com/help/developer-manual/introduction.html
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    21 Jul 2009
    Link to this post
    Hello Benjamin,

    I agree that the interface is not documented, but it exists into assemble. Please check attached screenshot and assemble I am sending you.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
    Answered
  8. Benjamin
    Benjamin avatar
    6 posts
    Registered:
    30 Jan 2008
    21 Jul 2009
    Link to this post
    Thanks for linking the assembly, Ivan.

    The assemblies I was searching through was the 3.2 assemblies instead of the version I'm using, which is 3.6. I have the interface now.

    Thanks,
    Ben 
Register for webinar
8 posts, 1 answered