diff --git a/src/Middleware/Diagnostics/src/Resources.resx b/src/Middleware/Diagnostics/src/Resources.resx
index 8cd9b2ea53..a45c81ad7e 100644
--- a/src/Middleware/Diagnostics/src/Resources.resx
+++ b/src/Middleware/Diagnostics/src/Resources.resx
@@ -248,7 +248,7 @@
Environment:
- An error occurred when configuring the exception handler middleware. Either the 'ExceptionHandlingPath' or the 'ExceptionHandler' option must be set in 'UseExceptionHandler()'.
+ An error occurred when configuring the exception handler middleware. Either the 'ExceptionHandlingPath' or the 'ExceptionHandler' property must be set in 'UseExceptionHandler()'. Alternatively, set one of the aforementioned properties in 'Startup.ConfigureServices' as follows: 'services.Configure<ExceptionHandlerOptions>(options => { ... });'.
No route values.
@@ -280,4 +280,4 @@
Name
-
\ No newline at end of file
+
diff --git a/src/Middleware/Diagnostics/test/UnitTests/ExceptionHandlerTest.cs b/src/Middleware/Diagnostics/test/UnitTests/ExceptionHandlerTest.cs
index d24965b760..da5c6c60d1 100644
--- a/src/Middleware/Diagnostics/test/UnitTests/ExceptionHandlerTest.cs
+++ b/src/Middleware/Diagnostics/test/UnitTests/ExceptionHandlerTest.cs
@@ -406,8 +406,9 @@ namespace Microsoft.AspNetCore.Diagnostics
var exception = Assert.Throws(() => new TestServer(builder));
// Assert
- Assert.Equal($"An error occurred when configuring the exception handler middleware. " +
- $"Either the 'ExceptionHandlingPath' or the 'ExceptionHandler' option must be set in 'UseExceptionHandler()'.",
+ Assert.Equal("An error occurred when configuring the exception handler middleware. " +
+ "Either the 'ExceptionHandlingPath' or the 'ExceptionHandler' property must be set in 'UseExceptionHandler()'. " +
+ "Alternatively, set one of the aforementioned properties in 'Startup.ConfigureServices' as follows: 'services.Configure(options => { ... });'.",
exception.Message);
}
}