Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ private RequestDelegate BuildErrorPageApplication(Exception exception)
.InformationalVersion;
model.ClrVersion = clrVersion;
model.OperatingSystemDescription = RuntimeInformation.OSDescription;
model.ShowRuntimeDetails = showDetailedErrors;

if (showDetailedErrors)
{
Expand Down
1 change: 1 addition & 0 deletions src/Hosting/Hosting/src/Internal/WebHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ private RequestDelegate BuildApplication()
.InformationalVersion;
model.ClrVersion = clrVersion;
model.OperatingSystemDescription = RuntimeInformation.OSDescription;
model.ShowRuntimeDetails = showDetailedErrors;

if (showDetailedErrors)
{
Expand Down
45 changes: 45 additions & 0 deletions src/Middleware/Diagnostics/Diagnostics.slnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"solution": {
"path": "..\\Middleware.sln",
"projects": [
"..\\Hosting\\Abstractions\\src\\Microsoft.AspNetCore.Hosting.Abstractions.csproj",
"..\\Hosting\\Hosting\\src\\Microsoft.AspNetCore.Hosting.csproj",
"..\\Hosting\\Server.Abstractions\\src\\Microsoft.AspNetCore.Hosting.Server.Abstractions.csproj",
"..\\Hosting\\TestHost\\src\\Microsoft.AspNetCore.TestHost.csproj",
"..\\Http\\Authentication.Abstractions\\src\\Microsoft.AspNetCore.Authentication.Abstractions.csproj",
"..\\Http\\Authentication.Core\\src\\Microsoft.AspNetCore.Authentication.Core.csproj",
"..\\Http\\Http.Abstractions\\src\\Microsoft.AspNetCore.Http.Abstractions.csproj",
"..\\Http\\Http.Extensions\\src\\Microsoft.AspNetCore.Http.Extensions.csproj",
"..\\Http\\Http.Features\\src\\Microsoft.AspNetCore.Http.Features.csproj",
"..\\Http\\Metadata\\src\\Microsoft.AspNetCore.Metadata.csproj",
"..\\Http\\Routing.Abstractions\\src\\Microsoft.AspNetCore.Routing.Abstractions.csproj",
"..\\Http\\WebUtilities\\src\\Microsoft.AspNetCore.WebUtilities.csproj",
"..\\Security\\Authorization\\Core\\src\\Microsoft.AspNetCore.Authorization.csproj",
"..\\Servers\\Connections.Abstractions\\src\\Microsoft.AspNetCore.Connections.Abstractions.csproj",
"..\\Servers\\IIS\\IISIntegration\\src\\Microsoft.AspNetCore.Server.IISIntegration.csproj",
"..\\Servers\\Kestrel\\Core\\src\\Microsoft.AspNetCore.Server.Kestrel.Core.csproj",
"..\\Servers\\Kestrel\\Kestrel\\src\\Microsoft.AspNetCore.Server.Kestrel.csproj",
"..\\Servers\\Kestrel\\Transport.Sockets\\src\\Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.csproj",
"..\\http\\Headers\\src\\Microsoft.Net.Http.Headers.csproj",
"..\\http\\Routing\\src\\Microsoft.AspNetCore.Routing.csproj",
"..\\http\\http\\src\\Microsoft.AspNetCore.Http.csproj",
"Diagnostics.Abstractions\\src\\Microsoft.AspNetCore.Diagnostics.Abstractions.csproj",
"Diagnostics.EntityFrameworkCore\\src\\Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.csproj",
"Diagnostics.EntityFrameworkCore\\test\\FunctionalTests\\Diagnostics.EFCore.FunctionalTests.csproj",
"Diagnostics.EntityFrameworkCore\\test\\UnitTests\\Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore.Tests.csproj",
"Diagnostics\\src\\Microsoft.AspNetCore.Diagnostics.csproj",
"Diagnostics\\test\\FunctionalTests\\Diagnostics.FunctionalTests.csproj",
"Diagnostics\\test\\UnitTests\\Microsoft.AspNetCore.Diagnostics.Tests.csproj",
"Diagnostics\\test\\testassets\\ClassLibraryWithPortablePdbs\\ClassLibraryWithPortablePdbs.csproj",
"Diagnostics\\test\\testassets\\DatabaseErrorPageSample\\DatabaseErrorPageSample.csproj",
"Diagnostics\\test\\testassets\\DeveloperExceptionPageSample\\DeveloperExceptionPageSample.csproj",
"Diagnostics\\test\\testassets\\ExceptionHandlerSample\\ExceptionHandlerSample.csproj",
"Diagnostics\\test\\testassets\\StatusCodePagesSample\\StatusCodePagesSample.csproj",
"Diagnostics\\test\\testassets\\WelcomePageSample\\WelcomePageSample.csproj",
"HttpOverrides\\src\\Microsoft.AspNetCore.HttpOverrides.csproj",
"MiddlewareAnalysis\\samples\\MiddlewareAnalysisSample\\MiddlewareAnalysisSample.csproj",
"MiddlewareAnalysis\\src\\Microsoft.AspNetCore.MiddlewareAnalysis.csproj",
"StaticFiles\\src\\Microsoft.AspNetCore.StaticFiles.csproj"
]
}
}
3 changes: 3 additions & 0 deletions src/Servers/IIS/IIS/src/StartupHook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ public static void Initialize()
new PhysicalFileProvider(contentRoot),
sourceCodeLineCount: 6);

// The startup hook is only present when detailed errors are allowed, so
// we can turn on all the details.
model.ErrorDetails = exceptionDetailProvider.GetDetails(exception);
model.ShowRuntimeDetails = true;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is necessary since the property defaults to false. I thought about defaulting it to true but I think it's better for users of the page to opt-in to detailed information.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the diagnostics one. It's a little deceptive because it's actually a different error page because it's even more detailed (query strings, headers, etc.) and the middleware is only enabled in Development mode.

I did miss GenericWebHostedService. Looking at that now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually it was the other way around :). I missed the WebHost one. Updated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, clarify why you don't need to updat ethe GenericWebHostedService model?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


var errorPage = new ErrorPage(model);

Expand Down
Loading