---
title: Register custom providers
related:
  - https://docs.kentico.com/documentation/developers-and-admins/customization/customize-system-providers.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

To replace the system implementations of [provider or helper classes](https://docs.kentico.com/documentation/developers-and-admins/customization/customize-system-providers.md) with your custom ones, use assembly attributes:

1. Edit your provider class.

2. Add a using statement for the **CMS** namespace:

   ```csharp
   using CMS;
   ```

3. Register your custom providers by adding assembly attributes above the class declaration:

   - `RegisterCustomProvider`
   - `RegisterCustomHelper`

The parameter of each attribute must contain the exact type of the custom class extending the given object (obtained using the `typeof` notation).

The customization automatically targets the provider object that matches the parent of the specified custom class.

```csharp title="Example"
// Registers custom providers
[assembly: RegisterCustomProvider(typeof(CustomUserInfoProvider))]
[assembly: RegisterCustomProvider(typeof(CustomMemberInfoProvider))] 
```

The system now uses your customized providers instead of the default functionality.

> **Note:** **Enabling class discovery**
>
> If your custom class is located in its own assembly (_Class Library_ project), you need to make sure class discovery is enabled for the project. Otherwise, the _RegisterCustom_ attributes cannot work. See [Integrate custom code](https://docs.kentico.com/documentation/developers-and-admins/customization/integrate-custom-code.md).
