Run the ASP.NET Core MVC sample app
Run the ASP.NET Core MVC sample app and connect it to your Kontent.ai sample project to see how your content is displayed.
A quick check
Make sure you have the following ready:
Prepare your sample project
Kontent.ai comes with a few sample projects to showcase best practices. The .NET sample app is built around one of them.
Here’s how you can create your own sample project:
You now have a project named Sample Project you can use with the sample app!
- In Kontent.ai, click your initials in the bottom left corner.
- Select Projects.
- At the end of the list, click Create complete sample project.
- Select a subscription for the project.
- Click Create project.
Clone the app
Clone the sample app's repository to your device.
Run the app
The application will open automatically in your browser at
- In your IDE, open the solution using the DancingGoat.sln.
- Build the solution.
- In the DancingGoat folder, run
npm install && npm run build to install the packages and build CSS styles.
- Run the application (in Visual Studio, choose Debug > Start Without Debugging or hit CTRL + F5).
Connect your Kontent.ai sample project
When you run the application for the first time, you will see a Configuration page. Use the Configuration page to connect the app to your Sample Project in Kontent.ai.
The sample app now displays content from your sample project!
- Click Get project ID from Kontent.ai.
- Sign in to Kontent.ai.
- From the list of your projects, select the Sample Project.
- Click Select project.
Now, let’s explore the Sample Project and update its content so that you can see the changes reflected in your locally running application.
Explore your sample project
Let's explore your Kontent.ai sample project and update its content so that you can see the changes reflected in your locally running sample app.
git clone https://github.com/kontent-ai/sample-app-net.git
How the sample app looks on first run
More Kontent.ai sample apps
Tip: We recommend using your own sample project. That way you can freely experiment with content and its model.