if (env.IsDevelopment())
{
...
}
else
{
app.UseExceptionHandler("/error");
...
}
Then create an error controller
public class ErrorController : Controller
{
[Route("error")]
public IActionResult Index()
{
switch(Response.StatusCode)
{
case StatusCodes.Status200OK:
case StatusCodes.Status500InternalServerError:
return Redirect("/500");
default:
return Redirect("/404");
}
}
}
You can add the pages for any of the statuses you require.
How to implement custom page for /Account/AccessDenied route
Hello,
I would like to know if there is any way to implement a custom page that umbraco will use when session is expired to redirect the user.
Thanks,
NPina
you could do so ething like below.
Add this in startup.cs
Then create an error controller
You can add the pages for any of the statuses you require.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.