I'm using ASP.NET and making a website. I have a link to a pdf in some of my pages, but they all lead to 404 errors. I know the path is right as I used Visual Studio to generate the path, I didn't write it myself. Here you can see:
404 Error https://i.stack.imgur.com/x0A5p.png
Solution explorer, to show the path is right https://i.stack.imgur.com/itKrX.png
I searched this problem extensively, and the only solutions I found were for adding/removing mime pdf stuff from web.config and IIS application.config, but none of this was to any avail.
I also saw stuff involving code (like here Open PDF in web page of ASP.NET), but I don't think I should need any real code. I should just be able to link to the PDF resource on my server like other websites do.
Elsewhere on my site, I have a link to a PDF on another website which works perfectly. I'm not sure if this information is relevant or not.
If it matters, I'm using razor c#. The .NET and ASP.NET versions can be seen in the image above. The IIS version is