PDF.js in Blazor Wasm Hosted app running on Azure

Which product are you using?

PDF.js Express Version

Detailed description of issue
I am using PDF.js in Blazor Wasm app, the plugin works fine in rendering the demo page in localhost but when I publish the code to Azure then the plugin is not working. Anything specific needed to be done in setup when installing the Blazor app in Azure ?

Expected behaviour
Show demo.pdf page with plug-in with options.

Does your issue happen with every document, or just one?
All docs

Link to document
my working link is localhost, so can’t provide it, but it is demo pdf that comes with product

Code snippet
used below link to setup

Hello rajmettai,

Can you provide any errors in the console or network traffic?

Best regards,
Tyler Gordon

Here is the error.

Unexpected server response (500) while retrieving PDF “host/files/demo-annotated.pdf”

but I have checked the files folder under wwwroot has that pdf and not sure why pdf js can’t find it.


Hello rajmettai,

If you access the URL its trying to retrieve, do you get the PDF file?

Best regards,