Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
We are updating applications to net7 and discovered problems serving static files. We have a Razor convention that maps any unknown url to /index. Using debug logging, we figured out that it didn't match any static file, and used the Razor convention instead.
Logging output:
1 candidate(s) found for the request path '/bundles/shell-bundle.es.js'
Endpoint '/Index' with route pattern '{*url}' is valid for the request path '/bundles/shell-bundle.es.js'
Request matched endpoint '/Index'
Static files was skipped as the request already matched an endpoint.
I have created a small repro. This works as excepted on net6, but fails on net7 and net8.
If I remove UsePathBase(), things seem to be working again.
Expected Behavior
It should be possible to use
- Razor Convention
- UsePathBase()
- UseStaticFiles()
at the same time
Steps To Reproduce
https://github.com/kimbell/RazorStatics
Exceptions (if any)
No response
.NET Version
8.0.100-preview.7.23376.3
Anything else?
No response