-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
Description
If you believe you have an issue that affects the security of the platform please do NOT create an issue and instead email your issue details to secure@microsoft.com. Your report may be eligible for our bug bounty but ONLY if it is reported through email.
Describe the bug
If the Properties/launchSettings.json file is missing static assets from Razor class libraries no longer seem to work. They all lead to HTTP 404 status.
To Reproduce
Steps to reproduce the behavior:
- Create a blazorserver application using Preview 8:
dotnet new blazorserver
- Install a third party library that has static assets e.g. Blazored.Toast:
dotnet add package Blazored.Toast
- Include its CSS file by adding this line to _Host.cshtml:
<link href="_content/Blazored.Toast/blazored-toast.css" rel="stylesheet" />
- Run the application
dotnet run
and open the asset by loadinghttps://localhost:5001/_content/Blazored.Toast/blazored-toast.css
. You should see the file content.
- Stop the application and delete the launchSettings.json file from the Properties directory
rm -rf Properties/launchSettings.json
- Run the application
dotnet run
and open the asset by loadinghttps://localhost:5001/_content/Blazored.Toast/blazored-toast.css
. It is no longer found.
Expected behavior
The assets should work with or without launchSettings.json.