Open
Description
Background and Motivation
Registering a custom IProblemDetailsWriter
after calling AddRazorPages
, etc results in the DefaultProblemDetailsWriter
, not the custom IProblemDetailsWriter
being called.
Proposed Analyzer
Analyzer Behavior and Message
Issue a warning when Registering a custom IProblemDetailsWriter
after calling AddRazorPages
, etc.
ASP0001: Authorization middleware is incorrectly configured is similar.
See dotnet/AspNetCore.Docs#29152
Note: When using a custom IProblemDetailsWriter
, the custom IProblemDetailsWriter
must be registered before calling AddRazorPages, AddControllers, or AddControllersWithViews.
Category
- Design
- Documentation
- Globalization
- Interoperability
- Maintainability
- Naming
- Performance
- Reliability
- Security
- Style
- Usage
Severity Level
- Error
- Warning
- Info
- Hidden
Usage Scenarios
Issue a warning when Registering a custom IProblemDetailsWriter
after calling AddRazorPages
, etc.
Risks
None.
Metadata
Metadata
Assignees
Labels
Indicates an issue which is related to analyzer experienceAPI was approved in API review, it can be implementedIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesThis issue describes a behavior which is not expected - a bug.Indicates that the issues may be a good fit for community to help with. Requires work from eng. team