DotNetBrightener.AspNet.Extensions.SelfDocumentedProblemResult.UI 2025.0.6-preview-315

This is a prerelease version of DotNetBrightener.AspNet.Extensions.SelfDocumentedProblemResult.UI.
There is a newer version of this package available.
See the version list below for details.
dotnet add package DotNetBrightener.AspNet.Extensions.SelfDocumentedProblemResult.UI --version 2025.0.6-preview-315
                    
NuGet\Install-Package DotNetBrightener.AspNet.Extensions.SelfDocumentedProblemResult.UI -Version 2025.0.6-preview-315
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DotNetBrightener.AspNet.Extensions.SelfDocumentedProblemResult.UI" Version="2025.0.6-preview-315" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DotNetBrightener.AspNet.Extensions.SelfDocumentedProblemResult.UI" Version="2025.0.6-preview-315" />
                    
Directory.Packages.props
<PackageReference Include="DotNetBrightener.AspNet.Extensions.SelfDocumentedProblemResult.UI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DotNetBrightener.AspNet.Extensions.SelfDocumentedProblemResult.UI --version 2025.0.6-preview-315
                    
#r "nuget: DotNetBrightener.AspNet.Extensions.SelfDocumentedProblemResult.UI, 2025.0.6-preview-315"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DotNetBrightener.AspNet.Extensions.SelfDocumentedProblemResult.UI@2025.0.6-preview-315
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DotNetBrightener.AspNet.Extensions.SelfDocumentedProblemResult.UI&version=2025.0.6-preview-315&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=DotNetBrightener.AspNet.Extensions.SelfDocumentedProblemResult.UI&version=2025.0.6-preview-315&prerelease
                    
Install as a Cake Tool

UI for ASP.NET Core Problem Result Extension

© 2024 DotNet Brightener

NuGet Version

Introduction

This is an extensions for ASP.Net Core applications that use the ProblemResult package. This package provides a UI for viewing information about a specific error / exception that can be thrown by the application.

Check out the ProblemResult package for more details on how to implement self-documented error objects.

Installation

You can install the package from NuGet:


dotnet add package DotNetBrightener.AspNet.Extensions.SelfDocumentedProblemResult.UI

Enable UI for viewing errors information

1. Enable generate XML documentation file in your projects / solutions.

Add the following code to the section <PropertyGroup> in your your .csproj file:

<GenerateDocumentationFile>true</GenerateDocumentationFile>

If you have multiple projects in your solution, you'll need to add the above code to all of the projects. Another way is to add that to the Directory.Build.props file in the root of your solution.

2. Configure the ASP.Net project to use the UI package.

Add the following code to your Startup.cs (if you use Startup.cs) or Program.cs (by default) file:


app.MapErrorDocsTrackerUI(options =>
{
    options.UiPath = "/errors-info-ui"; // this is where you can access the UI from your application
    options.ApplicationName = "Test Error"; // this is the name of your application
});

How this work?

When your application is configured to use UI package, the application will collect the error classes that are derived from IProblemResult. The error object when returned from the application, will now have type properties that leads to the information page of the error.

{
  "type": "https://localhost:7290/errors-info-ui#/WebAppCommonShared.Demo.Controllers.UserNotFoundError",
  "title": "User Not Found Error",
  "status": 404,
  "detail": "The error is thrown because the requested resource of type User could not be found",
  "instance": "/api/ExceptionTest/exception2/123",
  "data": {
    "userId": 123
  }
}

If developer / user opens the Url found in type property, they'll be able to see the information about the error. With the provided information, the developer can identify the issue and fix the issue easier. For the user, they can use this to seek support from developer.

Example

Given the error object defined as below:



/// <summary>
///     The error represents the requested object of type `User` could not be found
/// </summary>
/// <remarks>
///     The error is thrown because the requested resource of type `User` could not be found
/// </remarks>
public class UserNotFoundError : BaseProblemDetailsError
{
    public UserNotFoundError()
        : base(HttpStatusCode.NotFound)
    {

    }

    public UserNotFoundError(long userId)
        : this()
    {
        Data.Add("userId", userId);
    }
}

visiting the URL in type property will see an error page like following:

User Not Found Error

Description

The error represents the requested object of type User could not be found

Reason

The error is thrown because the requested resource of type User could not be found

Response HTTP Status Code

The request that encounters this error shall be responded with HTTP Status Code 404.

Additionally, refer to RFC 9110 Document Specification for Status Code 404.

Response Body

Below is the sample response body of the request that encounters this error. Depends on the error, there can be additional properties that help you identify the issue.

{
  "type": "https://localhost:7290/errors#WebAppCommonShared.Demo.Controllers.UserNotFoundError",
  "title": "User Not Found Error",
  "status": 404,
  "detail": "The error is thrown because the requested resource of type User could not be> >found",
  "instance": "{usually is URL of the request}"
}

The Description of the page is pulled from XML Document <summary> tag, and the Reason is pulled from <remarks> tag. The Response HTTP Status Code is the status code that the error object is associated with. The Response Body is the sample response body that the error object will be returned.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.0.1-preview-713 392 12/10/2025
2026.0.1-preview-700 207 12/7/2025
2026.0.1-preview-689 97 12/6/2025
2026.0.1-preview-676 658 12/2/2025
2026.0.1-preview-671 104 11/29/2025
2026.0.1-preview-670 101 11/29/2025
2026.0.1-preview-669 99 11/29/2025
2026.0.1-preview-667 163 11/27/2025
2026.0.1-preview-665 159 11/27/2025
2026.0.1-preview-664 158 11/27/2025
2026.0.1-preview-660 168 11/25/2025
2025.0.10 172 11/25/2025
2025.0.10-preview-628 385 11/19/2025
2025.0.10-preview-605 261 11/17/2025
2025.0.10-preview-602 268 11/17/2025
2025.0.10-preview-581 282 11/11/2025
2025.0.10-preview-559 182 10/29/2025
2025.0.10-preview-557 177 10/27/2025
2025.0.9 174 10/26/2025
2025.0.9-preview-553 161 10/26/2025
2025.0.9-preview-539 109 10/12/2025
2025.0.9-preview-535 154 10/8/2025
2025.0.9-preview-509 184 10/2/2025
2025.0.9-preview-508 165 10/2/2025
2025.0.9-preview-487 190 9/29/2025
2025.0.9-preview-481 158 9/29/2025
2025.0.9-preview-473 135 9/28/2025
2025.0.8 174 9/23/2025
2025.0.6 192 9/22/2025
2025.0.6-preview-455 174 9/22/2025
2025.0.6-preview-454 298 9/17/2025
2025.0.6-preview-441 133 9/14/2025
2025.0.6-preview-440 132 9/14/2025
2025.0.6-preview-406 175 9/2/2025
2025.0.6-preview-401 162 9/2/2025
2025.0.6-preview-400 162 9/2/2025
2025.0.6-preview-369 212 8/27/2025
2025.0.6-preview-368 199 8/27/2025
2025.0.6-preview-334 184 8/18/2025
2025.0.6-preview-333 127 7/27/2025
2025.0.6-preview-332 496 7/24/2025
2025.0.6-preview-331 503 7/24/2025
2025.0.6-preview-328 492 7/24/2025
2025.0.6-preview-327 343 7/21/2025
2025.0.6-preview-326 350 7/21/2025
2025.0.6-preview-325 259 7/20/2025
2025.0.6-preview-324 255 7/20/2025
2025.0.6-preview-322 249 7/20/2025
2025.0.6-preview-321 260 7/19/2025
2025.0.6-preview-320 259 7/19/2025
2025.0.6-preview-319 168 7/17/2025
2025.0.6-preview-317 162 7/17/2025
2025.0.6-preview-316 165 7/17/2025
2025.0.6-preview-315 167 7/17/2025
2025.0.6-preview-314 163 7/17/2025
2025.0.6-preview-313 169 7/17/2025
2025.0.6-preview-312 170 7/16/2025
2025.0.5 186 7/10/2025
2025.0.5-preview-307 104 7/5/2025
2025.0.4 111 7/5/2025
2025.0.4-preview-305 116 7/4/2025
2025.0.4-preview-304 166 7/1/2025
2025.0.4-preview-299 156 5/31/2025
2025.0.4-preview-298 128 5/30/2025
2025.0.4-preview-296 168 5/30/2025
2025.0.4-preview-295 176 5/29/2025
2025.0.4-preview-293 180 5/26/2025
2025.0.4-preview-292 177 5/26/2025
2025.0.3 150 2/10/2025
2025.0.3-preview-288 136 2/10/2025
2025.0.2 141 1/21/2025
2025.0.2-preview-278 130 1/21/2025
2025.0.2-preview-277 149 12/16/2024
2025.0.1-rc-243301701 398 11/25/2024
2024.0.14.6 135 11/25/2024
2024.0.14.6-rc-243031001 198 10/29/2024
2024.0.14.6-rc-243030701 128 10/29/2024
2024.0.14.6-rc-242840501 131 10/10/2024
2024.0.14.6-rc-242820305 118 10/8/2024
2024.0.14.6-rc-242771401 229 10/3/2024
2024.0.14.6-rc-242770501 119 10/3/2024
2024.0.14.6-rc-242770201 143 10/3/2024
2024.0.14.6-rc-242761801 128 10/2/2024
2024.0.14.6-rc-242761601 144 10/2/2024
2024.0.14.6-rc-242761501 142 10/2/2024
2024.0.14.6-rc-242761401 139 10/2/2024
2024.0.14.6-rc-242760701 140 10/2/2024
2024.0.14.6-rc-242751002 126 10/1/2024
2024.0.14.6-rc-242750901 146 10/1/2024
2024.0.14.6-rc-242750502 139 10/1/2024
2024.0.14.6-rc-242750201 126 10/1/2024
2024.0.14.6-rc-242741501 120 9/30/2024
2024.0.14.6-rc-242730701 137 9/29/2024
2024.0.14.6-preview-2730501 103 9/29/2024
2024.0.14.6-preview-2701501 168 9/26/2024
2024.0.14.6-preview-2620901 175 9/18/2024
2024.0.14.6-preview-2570701 150 9/13/2024
2024.0.14.6-preview-2510703 191 9/7/2024
2024.0.14.6-preview-2480501 139 9/4/2024
2024.0.14.6-preview-2430401 173 8/30/2024
2024.0.14.6-preview-242730701 118 9/29/2024
2024.0.14.6-preview-2421703 132 8/29/2024
2024.0.14.6-preview-2421701 132 8/29/2024
2024.0.14.6-preview-2420901 130 8/29/2024
2024.0.14.6-preview-2390101 164 8/26/2024
2024.0.14.6-preview-2381603 170 8/25/2024
2024.0.14.6-preview-2341601 177 8/21/2024
2024.0.14.6-preview-2321602 155 8/20/2024
2024.0.14.6-preview-2190801 160 8/6/2024
2024.0.14.6-preview-2041501 130 7/22/2024
2024.0.14.6-preview-1920603 197 7/10/2024
2024.0.14.6-preview-1920301 146 7/10/2024
2024.0.14.6-preview-1911302 154 7/9/2024
2024.0.14.6-preview-1901001 162 7/8/2024
2024.0.14.6-preview-1900901 127 7/8/2024
2024.0.14.6-preview-1900801 148 7/8/2024
2024.0.14.6-preview-1860304 133 7/4/2024
2024.0.14.5 178 7/1/2024
2024.0.14.5-preview-1811601 147 6/29/2024
2024.0.14.5-preview-1810501 160 6/29/2024
2024.0.14.5-preview-180132 145 6/28/2024
2024.0.14.5-preview-180131 145 6/28/2024
2024.0.14.5-preview-180121 150 6/28/2024
2024.0.14.4 170 6/27/2024
2024.0.14.4-preview-8 142 6/27/2024
2024.0.14.4-preview-7 129 6/27/2024
2024.0.14.3 153 6/21/2024
2024.0.14.1 148 6/6/2024
2024.0.14.1-preview 123 6/6/2024
2024.0.14-preview-1 127 6/6/2024
2024.0.13.8-preview 125 6/6/2024
2024.0.13.2-preview-247 136 6/6/2024
2024.0.13.1-preview-0146 122 6/6/2024
2024.0.13-preview-1 141 6/6/2024
2024.0.12.15803-preview-03 128 6/6/2024
2024.0.12.15608 158 6/4/2024
2024.0.12.15515 193 6/3/2024
2024.0.12.15220 149 5/31/2024
2024.0.12.15220-alpha31-240... 125 5/31/2024
2024.0.12.14911 178 5/28/2024
2024.0.12.14910-alpha28-240... 117 5/28/2024
2024.0.12.14823 154 5/27/2024
2024.0.12.14522-alpha7-2405... 154 5/24/2024
2024.0.12.14514-alpha6-2405... 146 5/24/2024
2024.0.12.14511 175 5/24/2024
2024.0.12.14314 203 5/22/2024
2024.0.12.14114 176 5/20/2024
2024.0.12.12815 210 5/7/2024
2024.0.12.12814 175 5/7/2024
2024.0.12.12721 186 5/6/2024
2024.0.12.12702 180 5/5/2024
2024.0.12.12622 199 5/5/2024
2024.0.12.12514 175 5/4/2024
2024.0.12.12512 179 5/4/2024
2024.0.12.12510 183 5/4/2024
2024.0.12.12420 137 5/3/2024
2024.0.12.12319 140 5/2/2024
2024.0.12.12319-rc-2405021801 130 5/2/2024
2024.0.12.12318 127 5/2/2024
2024.0.12.12215 156 5/1/2024
2024.0.12.12011 165 4/29/2024
2024.0.12.11720 161 4/26/2024
2024.0.12.11719 161 4/26/2024
2024.0.12.11621 172 4/25/2024
2024.0.12.11523 161 4/24/2024
2024.0.12.11522 163 4/24/2024
2024.0.12.11417 185 4/23/2024
2024.0.12.11400 177 4/22/2024
2024.0.12.11316 182 4/22/2024
2024.0.11.10220 181 4/11/2024
2024.0.11.10120 161 4/10/2024
2024.0.11.10119 142 4/10/2024
2024.0.11.10115 157 4/10/2024
2024.0.11.9914 182 4/8/2024
2024.0.11.9901 155 4/7/2024
2024.0.11.9823 169 4/7/2024
2024.0.11.9401 166 4/2/2024
2024.0.11.9301 167 4/1/2024
2024.0.11.9206 171 3/31/2024
2024.0.11.9205 171 3/31/2024