Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Blazor wasm not serving static files from wwwroot after deploying to IIS

$
0
0

I'm developing a .NET 5.0 Blazor WASM application. When I run the app form visual studio using IIS Express and navigate to https://localhost:5001/docs/simple.pdf, the file is served in browser.

However the same does not work after deploying the Blazor WASM app to IIS. I'm not getting any error instead my Not Found Route template screen gets loaded.

Here is the screen prints:

wwwroot of the Blazor WASM app:

enter image description here

IIS Express loading the document:

enter image description here

IIS virtual directory path:

enter image description here

IIS not loading the document and displaying a NotFound Route template:

enter image description here

I also noticed none of the files in wwwroot is not directly accessible in browser in IIS.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>