Css "not found"

So, I see now the issue for a MacOS Blazor Server app. It works if all the files are in my home folder, but any other folder, it doesn’t find the css or favicon files. So,anyone know how to tell Blazor to look at the current folder, not my home folder for these files?
I feel like it might have to do with the <base href> setting?
It’s set to <base href=“~/“ /> but changing it to ”” or ”./" doesn’t fix it…

Did you try “/” ?

I think so. I’ll try again…

Nope, no joy there. I’ll try getting rid of that tag and see if that makes a difference.

is there a server config file that might be involved ?

dunno blazor so this too is just a WAG :slight_smile:

Probably. I dunno Blazor either, just trying it out.
Read this a few times, but I can’t really understand it.

I wish I could find someone with VS2022 on Windows (or VM) and a Mac…

None of the forums/chat groups have anyone that isn’t just using Windows.

Could be something to do with app.UsePathBase();, just randomly trying things now…

not entirely clear to me either
without messing with it to poke about its hard to know what it thinks the wwwroot is
but it seems like it should be the wwwroot in the published directory (in the image way way back its publish2/wwwroot)
and then the css path seems ok but obviously isnt

Thanks, Norm. I’ve searched for weeks on the 'web to try and find the answer. The closest thing I found today is that the app DOES run properly if it’s in the home folder on my Mac. Any other folder and it can’t find the static files.

Clearly a base path issue, but for the life of me, I can’t solve it.

the “server” is not finding the files. The URLs look to be correct, the files simply aren’t there for the browser.

Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET http://localhost:5000/css/bootstrap/bootstrap.min.css - -
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 GET http://localhost:5000/css/bootstrap/bootstrap.min.css - - - 404 0 - 0.1046ms

info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET http://localhost:5000/BlazorApp1.styles.css - -
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 GET http://localhost:5000/BlazorApp1.styles.css - - - 404 0 - 0.2285ms

info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/1.1 GET http://localhost:5000/css/site.css - -
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
      Request finished HTTP/1.1 GET http://localhost:5000/css/site.css - - - 404 0 - 0.0863ms

Another WAG: Access permission?

What about the Shared (user) folder?

How would I check?
Oh, the error is 404 (not found). Do you think I would see an error like that if the file was there but read-only or something?

As I said, try to put it in the Shared User folder that is accessible to every user.

And yes, it SHOULD say something like “access denied” but who knows … that’s why it’s a WAG …

Nope.

Only at ~/

Paste the contents of your web.config

Where would I find that?

That’s probably a Windows thing.
The MacOS build now looks like this:

Ah sorry, I’ll have to re-read the thread in a bit.

maybe the appsettings.json or appsettingsDevelopment.json ?
those sound like app config files

very odd