I've built a blazor app that has no issues at the moment. When I call "dotnet publish -c Release" I get a published project, except the output is an executable file that ubuntu picks up as an octet-stream or something along the lines. If I run it, it just opens the server on localhost:5000. Copying this to my web server through cpanel did nothing -- even trying to test out a generic blazor Wasm app and publishing it gave me an index.html, but it would never actually load anything when I uploaded it to my web server. How can I get dotnet to publish this with an index.html file? All I get is the js and css folders and the executable file on the outer "wwwroot" folder.
(P.S. I'm using webhostingpad.com with shared hosting, so I don't have access to ssh to do things like installing nginx or a parallel route through IIS or Azure or something)
Blazor WebAssembly:
https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-3.1#standalone-deployment
Blazor server:
https://docs.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/server?view=aspnetcore-3.1#linux-with-apache
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With