Skip to content

Instantly share code, notes, and snippets.

@sitefinitySDK
Created May 22, 2018 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sitefinitySDK/176170e429c93259fa2989675c84f534 to your computer and use it in GitHub Desktop.
Save sitefinitySDK/176170e429c93259fa2989675c84f534 to your computer and use it in GitHub Desktop.
SF_10.1, SF_10.2, SF_11.0, SF_11.1, SF_11.2, SF_12.0, SF_12.1, SF_12.2, SF_13.0, SF_13.1, SF_13.2, SF_13.3 - https://docs.sitefinity.com/mvc-change-the-response-status-of-the-custom-error-page
using System.Web.Mvc;
namespace SitefinityWebApp
{
public class MyAppController : Controller
{
public ActionResult Index()
{
Response.Status = "404 Not Found";
Response.StatusCode = 404;
Response.StatusDescription = "Not Found!";
return View("Error_404");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment