---
title: Configuring the MVC application
---

> 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).

> **Info:** This page is a part of a tutorial, which you should follow sequentially, from the beginning to the end. [Go to the first page: Getting started with Kentico](https://docs.kentico.com/k12sptutorial/getting-started-with-kentico.md).

In the [previous step](https://docs.kentico.com/k12sptutorial/mvc-development/installing-kentico.md) of the tutorial, you have installed the Kentico instance that will serve as your MVC site's content repository and the associated MVC project you will use to present your site. In this step, you will configure the MVC project by enabling **preview mode** support and the **page builder feature** via the _ApplicationBuilder_ class.

_Preview mode_ in Kentico provides a way for your editors to view the MVC pages in the Kentico administration interface. With the correct implementation, the preview mode also shows the latest version of pages even before they are published to the live site (this topic is not covered within this tutorial).

The _page builder feature_ enables non-technical users to manage page content via an intuitive drag-and-drop interface. When using the page builder, editors work with widgets – predefined, configurable pieces of content prepared by the developers.

Integrating the page builder is a multistep process that you will be guided through during this tutorial.

## Configuring the MVC project

1. Open the **MEDIOClinic.sln** solution in Visual Studio.
   - The solution is located in the path set by the **Target location** option during the installation process: _C:\inetpub\wwwroot\Kentico12_
2. In the _App\_Start_ folder, edit the **ApplicationConfig.cs** file.
   - The **ApplicationConfig** class is included as part of the MVC project created by the Kentico installer and you can use it to selectively enable Kentico features in the MVC application. The class's _RegisterFeatures_ method is called in the _Application\_Start_ method of _Global.asax_ by default, ensuring all configured features are automatically enabled when the site starts.
3. Uncomment the **builder.UsePreview()** and **builder.UsePageBuilder()** lines in the **RegisterFeatures** method. The **ApplicationConfig** class should now contain the following code:

   ```csharp

   using Kentico.Web.Mvc;
   using Kentico.Content.Web.Mvc;
   using Kentico.PageBuilder.Web.Mvc;

   namespace MEDIOClinic
   {
       public class ApplicationConfig
       {
           public static void RegisterFeatures(IApplicationBuilder builder)
           {
               // Enable required Kentico features

               // Uncomment the following to use the Page builder feature

               // Enables the Preview mode functionality, which allows your website editors to preview
               // the content of the MVC site's pages from the Kentico user interface.
               builder.UsePreview();

               // Enables the page builder feature, which allows editors to compose page content via
               // page builder widgets on preconfigured pages.
               builder.UsePageBuilder();
           }
       }
   }

   ```
4. **Build** the _MEDIOClinic_ solution.

You are all set! Your MVC application is now configured, and you can start building your site's pages in the next step.

**Previous page:** [Installing Kentico](https://docs.kentico.com/k12sptutorial/mvc-development/installing-kentico.md) — **Next page:** [Creating content-only page types](https://docs.kentico.com/k12sptutorial/mvc-development/creating-content-only-page-types.md)

**Completed pages:** 3 of 10
