app.UseRouting must be called after UsePathBase
#48370
Labels
analyzer
Indicates an issue which is related to analyzer experience
api-suggestion
Early API idea and discussion, it is NOT ready for implementation
area-mvc
Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Background and Motivation
Although this is documented, many customers hit this problem:
@Tratcher and @halter73 suggest an analyzer in this comment
Proposed Analyzer
The implicit call to
UseRouting
thatWebApplication
added at the start of the pipeline configures routing beforeUsePathBase
is called.Warn when Routing happens before
UsePathBase
Analyzer Behavior and Message
Warn when Routing happens before
UsePathBase
Link to app.UseRouting
Category
Severity Level
Usage Scenarios
Anytime Routing happens before
UsePathBase
Risks
None
The text was updated successfully, but these errors were encountered: