I am working on an asp.net MVC 3.1 web application,and i follow the steps inside this link to activate showing a privacy message @ https://docs.microsoft.com/en-us/aspnet/core/security/gdpr?view=aspnetcore-3.1 .
now inside my Action Method, i want to check if the user accept the privacy alert or not, i tried the following code:-
var consentFeature = HttpContext.Features.Get<ITrackingConsentFeature>(); var canTrack = !consentFeature?.CanTrack ?? false;
but the canTrack will always be false, even if the user accepts the privacy alert. any advice on this please? Thanks