Create membership provider: Optimize the provider to use Sitefinity CMS UI

This step of the tutorial demonstrates how you can integrate your custom membership provider to support the user interface of Sitefinity CMS. The example in this repository is a fully functional implementation of the standard SqlMembershipProvider with support for filtering, paging, search, and sorting.

If you have a small number of users, you can register your custom membership provider in the web.config file. If you have large number of users (~ 10 000 or above), this type of implementation will cause an overhead. The reason is that the MembershipProvider class provides only a single method for filtering users - the GetAllUsers(int pageIndex, int pageSize, out int totalRecords) method. This method uses only paginated data with no support for filtering, searching, or sorting. You can configure custom membership providers to support such functionality by using the IBasicQueryExecutor interface. This way, you benefit from:

  • Loading a small amount of users in memory
  • Faster user management

IbasicQueryExecutor interface

This interface exposes a single method - Execute(QueryArgs args). When decorated on a custom membership provider, this method is called whenever data is retrieved from the custom membership provider with the arguments for filtering, paging, sorting, and searching, provided in the args variable.

Download the Custom membership provider

You can download a fully functional example of a custom membership provider that is optimized to use Sitefinity CMS UI from Sitefinity CMS GitHub custom-membership-provider.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?