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.
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:
- .NET
- .NET Core 3.1 SDK with ASP.NET Core runtime (included in Visual Studio 2019 16.4 or newer)
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.
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.
- Clone or fork the repository.
- 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.)
- Run the
Kentico_13_0.exe
file. - Install a blank ASP.NET Core website.
- Give the site a name
MedioClinic
. - Let the installer deploy a database.
- In the cloned repository, adjust the connection strings to point to your newly deployed blank database.
- Also, adjust the
CMSHashStringSalt
environment value in the cloned repository to match the one in the newly deployed blank site. - In the cloned repository, run
/CMS/bin/ContinuousIntegration.exe -r
to restore the objects to the database. - Open the
WebApp.sln
solution and build it. - Register the administration application in IIS and add development licenses (found in the course).
Prior to enabling external authentication for your development instance, make sure you've set the ASPNETCORE_ENVIRONMENT
environment variable to Development
.
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.
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.
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.
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.
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.
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.