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.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to 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?