I wrote a Wep Application ASP NET CORE 2.2 in c# which uses the authorization. They work properly. When access is denied now the url is rewritten for example as follows:
https://ebbwebdev.azurewebsites.net/Account/AccessDenied?ReturnUrl=%2FTelemetries
and the page displayed is Error 404.
I'm using ASP.NET Core Identity.
How can I redirect access denied to a custom page?
Thanks for your cooperation.