In the ASPX project I am now converting to MVC 4 Razor the custom 404 error page had a few lines of code executed inside the OnLoad
event but my understanding of the MVC razor platform this event no longer exists so I am not sure where I would run this code at.
Here is the code from my ASPX page that I want to translate into a razor page that will handle my 404 events.
protected override void OnLoad(EventArgs e)
{
Response.TrySkipIisCustomErrors = true;
Response.Status = "404 Not FOund";
Response.StatusCode = 404;
base.OnLoad(e);
}