Hinweis: Dieser Artikel wurde ursprünglich veröffentlicht in 2009. Einige Schritte, Befehle oder Softwareversionen haben sich möglicherweise geändert. Überprüfen Sie die aktuelle Dokumentation von .Net für die neuesten Informationen.

Voraussetzungen

Bevor Sie beginnen, stellen Sie sicher, dass Sie Folgendes haben:

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

Zusammenfassung

Verwandte Artikel