Skip to content

Sample .NET MVC web application using the Kentico Cloud Delivery .NET SDK to retrieve content

License

Notifications You must be signed in to change notification settings

MaqSaid/cloud-sample-app-net

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kentico Cloud sample .NET MVC web application

This is a sample website written in ASP.NET MVC 5 that uses the Kentico Cloud Delivery .NET SDK to manage and retrieve content from Kentico Cloud, and the Kentico Cloud Personalization .NET SDK to track site visits.

You can register your account for free at https://app.kenticocloud.com.

Application setup

We recommend running the sample application in Visual Studio 2013 or later. By default, the application uses the default Kentico Cloud Sample project to serve content.

To run the aplication:

  1. Clone the sample application repository.
  2. Open the solution in Visual Studio (using the DancingGoat.sln file).
  3. Run the application.

The sample application will open in your browser.

Connect your project

If you already have a Kentico Cloud account, you can connect this sample application to a project of your own to access its unpublished content items, and track visitors on the site. For example, you can connect the application to your version of the Sample project.

  1. Select your project in Kentico Cloud.

  2. Navigate to the API keys section.

    • You will be copying the Project ID and API keys for the Delivery Preview API and Personalization API.
  3. Open the \DancingGoat\Web.config file.

  4. Use the values from your Kentico Cloud project in the Web.config file:

    • Project ID: Insert your project ID into the ProjectId application setting.
    • Delivery Preview API: Create a new application setting named PreviewToken in the <appSettings> section, and use the Delivery Preview API key as its value.
    • Personalization API: Create a new application setting named PersonalizationToken in the <appSettings> section, and use the Personalization API key as its value.
    <appSettings>
        ...
        <add key="ProjectId" value="YOUR_PROJECT_ID" />
        <add key="PreviewToken" value="YOUR_DELIVERY_PREVIEW_API_KEY" />
        <add key="PersonalizationToken" value="YOUR_PERSONALIZATION_API_KEY" />
        ...
    </appSettings>
  5. Save the changes.

  6. Run the application.

After you run the application, Kentico Cloud will track site visits and create new contacts when visitors submit a form. You will also be able to see all project content including the unpublished version of content items.

For more information about the integrations with the Delivery API and Personalization API, see the following:

Content administration

  1. Navigate to https://app.kenticocloud.com in your browser.
  2. Sign in with your credentials.
  3. Manage content in the content administration interface of your sample project.

You can learn more about content editing with Kentico Cloud in our Help Center.

Content delivery

You can retrieve content either through the Kentico Cloud Delivery SDK or the Kentico Cloud Delivery API:

  • For published content, use https://deliver.kenticocloud.com/PROJECT_ID/items.
  • For unpublished content, use https://preview-deliver.kenticocloud.com/PROJECT_ID/items.

For more details about Kentico Cloud APIs, see our API reference.

About

Sample .NET MVC web application using the Kentico Cloud Delivery .NET SDK to retrieve content

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 42.6%
  • JavaScript 41.8%
  • C# 15.6%