Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASP .NET 8 RC1 Routing & UseStaticFiles #50707

Closed
Github-Butler opened this issue Sep 14, 2023 · 8 comments
Closed

ASP .NET 8 RC1 Routing & UseStaticFiles #50707

Github-Butler opened this issue Sep 14, 2023 · 8 comments

Comments

@Github-Butler
Copy link

breaking change from preview 7 to RC1:
using the page Weather.razor with route wildcard @page "/{weather?}" worked perfectly and the static file /bootstrap/bootstrap.min.css was delivered as expected.
After upgrade to RC1 the static file route /bootstrap/bootstrap.min.css was ignored.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Sep 14, 2023
@mkArtakMSFT mkArtakMSFT added the Needs: Repro Indicates that the team needs a repro project to continue the investigation on this issue label Sep 14, 2023
@ghost
Copy link

ghost commented Sep 14, 2023

Thank you for filing this issue. In order for us to investigate this issue, please provide a minimal repro project that illustrates the problem without unnecessary code. Please share with us in a public GitHub repo because we cannot open ZIP attachments, and don't include any confidential content.

@ghost ghost added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Sep 14, 2023
@Bartmax
Copy link
Contributor

Bartmax commented Sep 14, 2023

catchall routes also looks like are having this problem too.

@Github-Butler
Copy link
Author

Minimal repro project: https://github.com/Github-Butler/Issue50707

@ghost ghost added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Sep 14, 2023
@krompaco
Copy link

I'm seeing same issue going from Preview 7 to RC 1 with no other code changes.

My controller route with this pattern now catches requests for physical files that I'm certain are in the wwwroot folder.

app.MapControllerRoute(
    name: "files",
    pattern: "{**path}",
    defaults: new { controller = "Content", action = "Files" });

@javiercn
Copy link
Member

This seems to be caused by the global implicit router running before the static files middlware.

@captainsafia you did fix something in this area recently, didn't you?

@javiercn javiercn added area-hosting Includes Hosting feature-minimal-hosting and removed Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. area-blazor Includes: Blazor, Razor Components Needs: Repro Indicates that the team needs a repro project to continue the investigation on this issue feature-routing labels Sep 27, 2023
@captainsafia
Copy link
Member

Yes, this issue was resolved in #50864. You can try the .NET 8 nightlies in github.com/dotnet/installers to see if that resolves the issue for your scenarios.

@Github-Butler
Copy link
Author

Problem resolved in ASP .NET Core 8 RC2

@captainsafia
Copy link
Member

Thanks for following up! Closing this issue now.

@ghost ghost locked as resolved and limited conversation to collaborators Nov 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants