Note : Cet article a été publié à l’origine en 2009. Certaines étapes, commandes ou versions de logiciels ont pu changer. Consultez la documentation actuelle de .Net pour les informations les plus récentes.

Prérequis

Avant de commencer, assurez-vous d’avoir :

  • Visual Studio or .NET CLI installed
  • .NET Framework or .NET Core SDK
  • Basic C# programming knowledge

How can you create custom error pages on an ASP.Net application so that you can better control the user experience when the unexpected happens? A: There is a configuration parameter in the Web.Config you can use to control what error pages the user sees:

This section of the web.config has to be placed in the following structure:


(<http://msdn.microsoft.com/en-us/library/5x77e536.aspx>)
  (<http://msdn.microsoft.com/en-us/library/dayb112d.aspx>)
    (<http://msdn.microsoft.com/en-us/library/y123fsf7.aspx>)


You can obtain more information on how to set this up by visiting the MSDN website. Here is an example obtained from there:

<system.web> </system.web>

Résumé

Articles Connexes