The setup consists of 2 parts: Azure and Sitefinity.
Azure Storage configuration and custom code implementation in Sitefinity.
Pre-Requisite
- Sitefinity 14.4+ (Tested)
- Running hybrid .NET Core and MVC mode (Net Core Renderer and Progress.Sitefinity)
- Azure Subscription with right permission to manage Azure Storage
Azure
- Go to Azure portal and navigate to Storage
- Create a storage account under resource group
- Add a storage table to store the logs, save the Url for later use.
- Generate a SAS (Shared access signature) for later use
Sitefinity
- Install nuget package Azure.Data.Tables in the Sitefinity project.
- Create a configuration section to save Azure Storage Table Url and SAS connection string (from Azure step 3 and step 4 above)
- Create Global file, user service and audit service in Sitefinity core CMS.
- Global.asax.cs
- UserService.cs
- AuditServices.cs
- Try to login a few times and see the logs appeared in Azure Storage Table
- Create a report view to show report in CMS dashboard
- ReportController.cs
- ReportModel.cs
- AuditReport.cshtml
- Setup the widget in Backend Page.
Codes
GitHub Gist - Sample Code