The folder wwwroot that I drag and drop to deploy contains the file /pdf/foo.pdf. I want this pdf to be displayed in a new tab with <a href="pdf/foo.pdf" target="_blank">Open pdf</a>
but my Blazor app tells me
Sorry, there’s nothing at this address.
On this “Sorry”-page the Dev Tools > Sources > Page display the file foo.pdf but when I download it from there, there is no text in the file, where should be “test pdf”.
I disabled my anti virus app. It is still not working.
I also tested different browsers. Chrome and Edge only show the “Sorry”-page but no message in the console.
Firefox does not show the “Sorry”-page but the following message in the console:
The error is not a browser 404, it is a message from within your app (as evident by looking at the page source—see below), which indicates your app is handling the request (at least in some instances.)
There is an issue within your app I might suggest. However, as I had not heard of Blazor prior to reading your original post, I cannot offer any insights as to what the cause (potentially) is, or a solution.
You might find more assistance via a Blazor-specific community.