Posted on: 6/26/2015 8:55:19 PM | Views : 615

it must be such that I go into a side that I have not in the system should just be sent over to 404.aspx.
for example
www.blabla.com/gdes -> www.blabla.com/404.aspx
www.blabla.com/hello-world -> www.blabla.com/404.aspx
That is to be found since not at all have to be sent over to 404.aspx page
This is how I CloudFlare on the website.
void Application_Error(object sender, EventArgs e) { // Code that runs when an unhandled error occurs var serverError = Server.GetLastError() as HttpException; if (null != serverError) { int errorCode = serverError.GetHttpCode(); if (404 == errorCode) { Server.ClearError(); Server.Transfer("../404.aspx"); } } }  

Go to the complete details ...