Skip to content

nkooman/xperience-training-13

 
 

Repository files navigation

The Kentico Xperience 13 training website

CircleCI

About the repo

The repo contains the Medio Clinic sample website developed throughout the Kentico Xperience 13 for Developers course. The codebase represents the final state of development.

The repo currently contains code of the following modules of the course:

  • Essentials
  • Identity

The code of the modules does not exist in separate git branches or is otherwise split. It lives together as one working Visual Studio solution, internally separated using standard conventions (separate projects, MVC areas). Therefore, when taking the course, bear in mind that the code snippets in the course might slightly differ from what you see here in GitHub.

Requirements

Administration application prerequisites:

  • Operating systems
    • Windows 8.1 and newer
    • Windows Server 2012 and newer
  • IIS features
    • ASP.NET
    • .NET extensibility
    • ISAPI extensions
    • ISAPI filters
    • Static content
  • .NET
    • .NET Framework 4.8 or newer

Live site application prerequisites:

Common prerequisites:

  • Visual Studio 2019 Community or higher
    • ASP.NET and web development workload
    • .NET Core cross-platform development workload
    • Git for Windows
    • GitHub Extension for Visual Studio
  • SQL Server 2012 Express or higher
    • Case-insensitive collation

For a complete list of system requirements, refer to our documentation.

How to run the code

Below you'll find a high-level list of instructions. The full instructions can be found in the course.

You need to install Xperience program files along with a blank website instance. You'll only need the blank database. Once installed, both Visual Studio solutions of the administration application and the blank site can be deleted since all files are provided by this repository.

  1. Clone or fork the repository.
  2. Download the installer through the trial download page. (Existing customers can download the installer in the client portal. Partners can do so in the partner portal.)
  3. Run the Kentico_13_0.exe file.
  4. Install a blank ASP.NET Core website.
  5. Give the site a name MedioClinic.
  6. Let the installer deploy a database.
  7. In the cloned repository, adjust the connection strings to point to your newly deployed blank database.
  8. Also, adjust the CMSHashStringSalt environment value in the cloned repository to match the one in the newly deployed blank site.
  9. In the cloned repository, run /CMS/bin/ContinuousIntegration.exe -r to restore the objects to the database.
  10. Open the WebApp.sln solution and build it.
  11. Register the administration application in IIS and add development licenses (found in the course).

Enabling external authentication

Prior to enabling external authentication for your development instance, make sure you've set the ASPNETCORE_ENVIRONMENT environment variable to Development.

Google

Create a new Google Console project for your website. Create the OAuth Consent Screen and generate the OAuth Client ID. Set the Authorized redirect URIs to https://localhost:44324/signin-google.

Add the generated Client ID to your appsettings.json:

"GoogleAuthenticationOptions": {
  "UseGoogleAuth": true,
  "ClientId": "<your-client-id>",
  "ClientSecret": "<your-client-secret>"
},

Store the Client Secret value using the Secret Manager feature.

Microsoft

In the Azure Portal, create a new App registration following Microsoft's documentation. Ensure that the Redirect URI is set to https://localhost:44324/signin-microsoft.

Add the Application (client) ID from the Overview tab you generated to the appsettings.json:

"MicrosoftAuthenticationOptions": {
  "UseMicrosoftAuth": true,
  "ClientId": "<your-client-id>",
  "ClientSecret": "<your-client-secret>"
},

Store the Client secret value using the Secret Manager feature.

Facebook

Create a Facebook application with the OAuth Redirect URL of https://localhost:44324/signin-facebook. Add the following to your appsettings.json with the App ID from the Settings > Basic tab:

"FacebookAuthenticationOptions": {
  "UseFacebookAuth": true,
  "AppId": "<your-app-id>",
  "AppSecret": "<your-app-secret>"
},

Store the App secret value using the Secret Manager feature.

Twitter

Create a Twitter application with the Callback URL of https://localhost:44324/signin-twitter. On the Keys and Tokens tab, copy the API key into your appsettings.json:

"TwitterAuthenticationOptions": {
  "UseTwitterAuth": true,
  "ConsumerKey": "<your-api-key>",
  "ConsumerSecret": "<your-api-secret-key>"
},

Store the API secret key value using the Secret Manager feature.

Coding conventions

The code in this repo follows the standard C# coding conventions documented in the C# programming guide, and the coding guidelines held by the ASP.NET Core product team at Microsoft.

Troubleshooting

If you encounter a problem while going through the course, please let us know either through the course survey or by filing an issue here in GitHub.

About

Kentico Xperience 13 training website

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 52.3%
  • JavaScript 27.9%
  • ASP.NET 12.4%
  • Less 3.9%
  • CSS 2.1%
  • HTML 0.8%
  • Other 0.6%