TL;DR — Resumen Rápido

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

Nota: Este artículo fue publicado originalmente en 2009. Algunos pasos, comandos o versiones de software pueden haber cambiado. Consulta la documentación actual de .Net para la información más reciente.

Requisitos Previos

Antes de comenzar, asegúrate de tener:

  • 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:


(<https://learn.microsoft.com/en-us/library/5x77e536.aspx>)
  (<https://learn.microsoft.com/en-us/library/dayb112d.aspx>)
    (<https://learn.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>

Resumen

Artículos Relacionados