AI agents: the content index is at /llms.txt. Every page is also available as Markdown — send the request header Accept: text/markdown, or append .md to the page URL.
Xperience Docs

Cookie consent

We use necessary cookies (opens in a new tab) to run our website and improve your experience while browsing. Additional cookies are only used with your consent. You may revoke your consent on the Cookies Policy (opens in a new tab) page or in your browser at any time.

Configure (opens in a new tab)
  • Documentation
    InstallationUsing the Xperience interfaceDeveloping websitesConfiguring XperienceManaging usersSecuring websitesDeploying websitesManaging website contentMultilingual websitesMacro expressionsExternal utilitiesIntegrating 3rd party systemsCustom developmentE-commerce featuresOn-line marketing featuresRelease notes - Xperience 13Xperience terminology glossary
  • Tutorial
    Using the Xperience interfaceDeveloper tutorialBusiness tutorialResource hub for marketers
  • API Examples
    ConfigurationContent managementDevelopmentE-commerceOn-line marketingSocial media
  • Community Questions & Answers (opens in a new tab)
  • Contact support (opens in a new tab)
  1. Home
  2. Developing websites
  3. Developing Xperience applications using ASP.NET Core
  4. Starting with ASP.NET Core development
  5. Enabling Xperience features in ASP.NET Core applications

Enabling Xperience features in ASP.NET Core applications


Was this page helpful?

Send us feedback Go back to top

In Xperience, some features provided by the system need to be explicitly enabled on the side of the front-end ASP.NET Core application. This is an intentional design choice that allows you to enable and configure only the features you end up integrating. Individual features register additional middleware and routes; having all features enabled by default would unnecessarily impact application performance.

Features are enabled within the ConfigureServices method of the application's startup class. The IServiceCollection.AddKentico method that adds Xperience classes to the service container optionally takes an IFeaturesBuilder delegate where you can enable individual system features. Each feature is enabled with a corresponding Use*FeatureName* extension method:

C#Application startup class
public void ConfigureServices(IServiceCollection services)
{
    ...

    services.AddKentico(features =>
    {
        features.Use*FeatureName*();
    });

    ...
}

The following table provides an overview of all features that can be enabled:

Feature

Extension method

Description and additional notes

Page builder

UsePageBuilder

(Kentico.PageBuilder.Web.Mvc)

See Page builder development for more details and additional configuration options.

Content tree-based routing and alternative URLs

UsePageRouting

(Kentico.Content.Web.Mvc.Routing)

Content tree-based routing is enabled automatically by calling UsePageRouting. The site's routing mode also must be set to Based on content tree under Settings -> URLs & SEO -> Routing mode in the Xperience administration application.

To enable the alternative URLs feature, pass a PageRoutingOptions object to the method and set the EnableAlternativeUrls property to true:

C#
features.UsePageRouting(new PageRoutingOptions
    {
        EnableAlternativeUrls = true;
    });

If you only want to enable alternative URLs, you need to explicitly disable the routing feature:

C#
features.UsePageRouting(new PageRoutingOptions
    {
        EnableAlternativeUrls = true;
        EnableRouting = false;
    });

See alternative URLs configuration for information about ways to further configure this feature.

Scheduler

UseScheduler

(Kentico.Web.Mvc)

Requires scheduled tasks to be enabled in Settings -> System -> Enable scheduled tasks within the Xperience administration.

You also need to configure individual site-specific scheduled tasks to run on the live site in the Scheduled tasks application.

See Processing scheduled tasks on the live site for more information.

A/B testing

UseABTesting

(Kentico.OnlineMarketing.Web.Mvc)

Requires A/B testing to also be enabled in Settings -> On-line marketing -> Enable A/B testing within the Xperience administration.

You also need to add logging scripts to your site's pages. See Enabling A/B testing.

Campaign logging

UseCampaignLogger

(Kentico.CampaignLogging.Web.Mvc)

To support all campaign conversion options, logging of membership and page-related activities must be enabled. See Logging activities.

Marketing email tracking

UseEmailTracking

(Kentico.Newsletters.Web.Mvc)

When a recipient opens a marketing email from Xperience or clicks a link in its content, a hidden request is sent to the front-end Core site. Routes registered by the UseEmailTracking method ensure that the tracking data is processed and logged into the shared Xperience database.

User activity tracking

UseActivityTracking

(Kentico.Activities.Web.Mvc)

Required for page-related activities that need to be logged manually in your code. See Logging activities for more information.

Web Analytics

UseWebAnalytics

(Kentico.OnlineMarketing.Web.Mvc)

Requires web analytics to also be enabled using the settings in Settings -> On-line marketing -> Web analytics within the Xperience administration.

You also need to add logging scripts to your site's pages. See Enabling web analytics.

Related pages

  • Developing Xperience applications using ASP.NET Core
  • Starting with ASP.NET Core development