From 246e3c75723788f9ff08b60a426f8bbc842ca30f Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Wed, 4 Jan 2017 17:13:29 -0500 Subject: [PATCH] Adding some links related to startup error handling behavior. (#2472) --- aspnetcore/fundamentals/error-handling.md | 6 ++++-- aspnetcore/fundamentals/startup.md | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/aspnetcore/fundamentals/error-handling.md b/aspnetcore/fundamentals/error-handling.md index b35d2643a2..6b982a8dc3 100644 --- a/aspnetcore/fundamentals/error-handling.md +++ b/aspnetcore/fundamentals/error-handling.md @@ -1,4 +1,4 @@ ---- +--- title: Error Handling | Microsoft Docs author: ardalis description: Explains how to handle errors in ASP.NET Core applications @@ -111,7 +111,9 @@ In addition to the exception handling logic in your app, the [server](servers/in Only the hosting layer can handle exceptions that take place during app startup. Exceptions that occur during app startup can impact server behavior. For example, if an exception happens before you call `KestrelServerOptions.UseHttps`, the hosting layer catches the exception, starts the server, and displays an error page on the non-SSL port. If an exception happens after that line executes, the error page is served over HTTPS instead. -## ASP.NET MVC Error Handling +You can [configure how the host will behave in response to errors during startup](hosting.md#configuring-a-host) using `CaptureStartupErrors` and the `detailedErrors` key. + +## ASP.NET MVC error handling [MVC](../mvc/index.md) apps have some additional options for handling errors, such as configuring exception filters and performing model validation. diff --git a/aspnetcore/fundamentals/startup.md b/aspnetcore/fundamentals/startup.md index 057af33fbf..49b470b48f 100644 --- a/aspnetcore/fundamentals/startup.md +++ b/aspnetcore/fundamentals/startup.md @@ -28,6 +28,8 @@ The `Startup` class constructor can accept dependencies that are provided throug The `Startup` class must include a `Configure` method and can optionally include a `ConfigureServices` method, both of which are called when the application starts. The class can also include [environment-specific versions of these methods](environments.md#startup-conventions). +Learn about [handling exceptions during application startup](error-handling.md#startup-exception-handling). + ## The Configure method The `Configure` method is used to specify how the ASP.NET application will respond to HTTP requests. The request pipeline is configured by adding [middleware](middleware.md) components to an `IApplicationBuilder` instance that is provided by dependency injection.