Dans une application ASP.NET régulière, vous pourriez avoir une section customErrors comme ce qui suit:Définition d'une page d'erreur 404
<customErrors mode="On">
<error statusCode="404" redirect="Nice-FileNotFound-Page.aspx"/>
</customErrors>
Est-il possible de définir l'erreur 404 au programme Application_Start? Quelque chose comme ce qui suit:
// Figure out which page should be used... using some logic somewhere in the application
// (obviously) Pseudo-code: Application.ErrorCode.404.Page = Page-Found-Above