Running the .NET sample app
In this guide, you'll get a brief introduction to website development practices with Kentico Kontent. You'll start by running the .NET sample application on your machine and updating an article in your Sample Project. Then you can explore how the article's content is structured.
New to Content as a Service?
If you are new to the world of Content as a Service (CaaS), you might want to start by building a Hello world application.
After you grasp the core idea behind CaaS, everything in the sample application will make a lot more sense much faster.
Table of contents
Sample project for the app
The sample app displays data from the Sample Project that demonstrates our best practices and features of Kentico Kontent. This full-featured project contains marketing content for Dancing Goat – an imaginary chain of coffee shops.
Once you run the sample app, you'll see content from the Sample Project displayed in your browser.
Running the .NET MVC sample application
Before going any further, make sure you have the following:
- An IDE (such as Visual Studio 2017Opens in a new window or later)
- A Kentico KontentOpens in a new window account with a Sample Project (you can also set one up during app configuration)
1. Download the app
The source code of the sample application lives in a Github repositoryOpens in a new window.
If you are used to working with GitOpens in a new window, you can clone the repository to your computer by typing the following to your console:
- shellgit clone https://github.com/Kentico/kontent-sample-app-net.git
git clone https://github.com/Kentico/kontent-sample-app-net.git
If you don't have Git installed, you can directly download the sample application as a ZIP fileOpens in a new window, extract it, and continue from there.
2. Run and configure the app
- Open the solution in your IDE (using the DancingGoat.sln file).
- Build the solution.
- Run the application (in Visual Studio, choose Debug -> Start Without Debugging or hit CTRL + F5).
The application will open automatically in your browser at
When you run the application for the first time, you will see a Configuration page. Use it to connect the app to your Sample Project in Kentico Kontent:
- Click Get project ID from Kentico Kontent. A new browser window will open.
- Sign in to your account or create a new oneOpens in a new window.
- From the list of your projects, select the Sample Project.
- Click Select project.
The application now displays content from your Sample Project.
Note: You can also set the project ID manuallyOpens in a new window in the app settings.
Now, let's explore the Sample Project and update its content so that you can see the changes reflected in your locally running application.
Making changes to your project
After signing in to your Kentico Kontent account you will see your Sample Project to play around with. Your welcome screen is a list of all the pieces of content in your project (we call them content items).
You can search for a content item by name or apply filters to quickly find what you are looking for:
- In the filter panel on the left, select the Article content type to view only articles.
- Click one of the articles to edit it. For example, try the Coffee processing techniques article. (Inside the running app, navigate to Articles -> Coffee processing techniques to see how the content is actually displayed.)
Updating a published article
The article is currently published and publicly accessible. This also means you cannot update it directly.
To edit the article, click Create a new version at the top. Now you can edit the text of the article or change its teaser image. Your changes will be saved automatically and won't affect the previously published version.
To make your changes visible in the sample app, publish the new version of the article:
- At the top of the page, click Change workflow.
- Select the Review workflow step.
- Assign yourself as a contributor.
- Click Change workflow at the bottom of the side panel.
- At the top of the page, click Publish.
- Click Publish at the bottom of the side panel.
Note: You can later customize the content workflow according to your needs.
Voila! You have successfully updated content in your Sample Project. Refresh the browser window with your application to see the changes on the website.
Feel free to further explore the Sample Project and the sample application.
The advantage of using Kentico Kontent lies in the freedom to define how your content is structured. Let's see an example inside the Sample Project itself.
Exploring content structure
To see details about the opened content item, go back to Kentico Kontent and click Content details in the top right.
Under Content type, you can see that the item is based on the Article content type.
To open the content type for editing, click Article in the content details.
How content is structured in Kentico Kontent
Content item is any piece of content in your project. It is made up of elements, such as texts, images, files, etc.
Each content item is based on a single content type. A content type is a template that defines the structure of the content item – which elements it contains, their names, limitations, guidelines, and so on.
You can mix and match the available elements to define your own content types.
Deploying the .NET sample app
You can deploy the application to Azure or another hosting service:
Tip: Auto-deployed sample application
Kentico Kontent makes no assumptions about how your content is displayed. It simply delivers it via a RESTful Delivery API to any application that asks for it – be it a website, mobile app, chatbot, electronic billboard, virtual voice assistant or an internet-enabled toaster.
We deliver the content, you do whatever you want with it – using the technology of your choice.
A traditional CMS would force you to put your content into neatly arranged boxes to fit inside a pre-defined template. The power of Kentico Kontent comes from not getting in your way. Content structure and content presentation are truly separated and you have the flexibility to define both according to the needs of your project.
- Ready to dive in? Build your own website from scratch. Take our tutorial on Building your first .NET Core app.
- Looking for inspiration? See what people are building with Kentico Kontent in our case studiesOpens in a new window and development blogOpens in a new window.
- For more information about the content creation process, see Write and collaborate.