I want to get the original path (entered by the user) in the error controller after redirect to the 404 error page ?!
public class ErrorViewModel
{
public string RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
public string RequestedUrl { get; set; }
public string RedirectUrl { get; set; }
public string ExceptionMessage { get; set; }
}
and in Error Controller
return View("ErrorPage", new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier,
RequestedUrl = "", RedirectUrl = HttpContext.Request.GetDisplayUrl(), ExceptionMessage = ReasonPhrases.GetReasonPhrase(statusCode) });


