When a Blazor server app is “published”, it creates a web server that can run on the host and then you open the browser to see the application. Much like Electron, but with C#.
When I create a Blazor app on Windows, it runs in the IDE and stand-alone when published on Windows.
When I create a Blazor app on MacOS, it runs in the IDE, and stand-alone when published on MacOS.
When I create a Blazor app on Windows, with MacOS as the target, and then run it on MacOS, the server starts up fine, and the app can be seen in the browser, but it doesn’t “see” the css. Looking at the “source” in the browser, I can see the lines pointing to the CSS, and a 404 error. The paths and filenames are correct, but it’s not loading them.
There should be more information hidden somewhere as to what actual error occurred when loading the resource. I want to say the “Network” tab, but I don’t use the Safari debugger enough to say for sure.
If you find details on the error that occurred, it may help figure out how to fix it.
With Firefox it is the Network tab. You’ll have to open up the debugger first, select the Network tab, then reload the page. Select the resource that erred, and it should open a view on the right side that has information. The Console tool might also contain some information as well.
that ones not expanded in the image so … hence why it was a WAG
is it also having issue with BlazorApp1.styles.css and bootstrap.min.css ?
they’re also marked in red
almost like the root of the site isnt right or something since it seems to not be finding several files
There’s literally NO .NET forums for MacOS users or any existing .NET forums that have any members that use Macs. .NET is SO Windows-centric. MacOS is just an afterthought.
As usual, I’m blazing new ground…
All these links show http:
Is there a certificate on the site?
If so, shouldn’t the URLs be https: ?
I ask because I went through hell with my own site this year (still not fully resolved tbh) , whereby a URL that used http: wouldnt work while one that had https: did, and some of this came down to caching and the use of Cloudflare as a CDN
(Sometimes the http URL would even return a file, but it might be months older than the actual current file.)
They show both. FF shows http:// and Safari shows https://
http:// automatically forwards to https:// with this configuration.
Remember it’s on a local machine, not a web server.
For the issue you were having, you need to add a configuration line in your apache or nginx setup to automatically forward http to https.