When a user goes to a non existing page, I refer to the standard login page :
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) { app.UseStatusCodePagesWithRedirects("/online/?statusCode={0}"); ...
On that page, I pass a message depending on the statuscode. However, I would like to show the URL of the page that created the error.
I tried Request.Headers["Referer"].ToString(), but that is empty. Is there a way to get the referrer?
Thanks
Pieter