Description
I do not understand the information in 'Static files in non-Development environments'.
It starts with 'When running an app locally ...' ... what does this mean? This is a web app, it's always run locally somewhere, do you mean when using launchProfiles or with debugger? What about dotnet watch or dotnet run ... will it correctly serve the static files?
I did not know that there is a difference in serving static files based on environment (except the caching header stuff in Development .. that part is clear).
Please elaborate more.
In addition to this the latest Razor pages template adds:
app.MapRazorPages.WithStaticAssets()
What does this do, there seems to be no documentation for it?
Page URL
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/static-files?view=aspnetcore-10.0#static-files-in-non-development-environments
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/static-files.md
Document ID
3fec6e08-fc99-7a5c-796f-3f2347cad891
Platform Id
5c42c2c8-be1b-60de-8cde-f9b8d8c24f5f
Article author
@wadepickett
Metadata
- ID: d47f38e2-bc36-cfb8-b0cc-17a534689f8b
- PlatformId: 5c42c2c8-be1b-60de-8cde-f9b8d8c24f5f
- Service: aspnet-core
- Sub-service: fundamentals
Related Issues
Description
I do not understand the information in 'Static files in non-Development environments'.
It starts with 'When running an app locally ...' ... what does this mean? This is a web app, it's always run locally somewhere, do you mean when using launchProfiles or with debugger? What about
dotnet watchordotnet run... will it correctly serve the static files?I did not know that there is a difference in serving static files based on environment (except the caching header stuff in Development .. that part is clear).
Please elaborate more.
In addition to this the latest Razor pages template adds:
app.MapRazorPages.WithStaticAssets()What does this do, there seems to be no documentation for it?
Page URL
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/static-files?view=aspnetcore-10.0#static-files-in-non-development-environments
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/static-files.md
Document ID
3fec6e08-fc99-7a5c-796f-3f2347cad891
Platform Id
5c42c2c8-be1b-60de-8cde-f9b8d8c24f5f
Article author
@wadepickett
Metadata
Related Issues