I working on web application with blazor app with .net core 7
. I build my application and
run it on my local machine it working perfect without any issues and display and retrieve data .
when publish it on IIS after that I test application I get error 404 error
so how to solve this error please ?
error details
Failed to load resource: the server responded with a status of 404 (Not Found)
GET http://localhost:245/BlazorUI.styles.css net::ERR_ABORTED 404 (Not Found)
Dashboard:13 GET http://localhost:245/css/site.css net::ERR_ABORTED 404 (Not Found)
Dashboard:20 GET http://localhost:245/~/assets/lib/bootstrap/dist/css/bootstrap.min.css net::ERR_ABORTED 404 (Not Found)
DevTools failed to load source map: Could not load content for http://localhost:245/assets/css/dashboard-free.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
blazor.server.js:1 [2023-02-23T13:48:46.310Z] Information: Normalizing '_blazor' to 'http://localhost:245/_blazor'.
blazor.server.js:1 [2023-02-23T13:48:46.341Z] Warning: Failed to connect via WebSockets, using the Long Polling fallback transport. This may be due to a VPN or proxy blocking the connection. To troubleshoot this, visit https://aka.ms/blazor-server-using-fallback-long-polling.
log @ blazor.server.js:1
dr @ blazor.server.js:1
await in dr (async)
ur @ blazor.server.js:1
await in ur (async)
(anonymous) @ blazor.server.js:1
(anonymous) @ blazor.server.js:1
blazor.server.js:1 GET http://localhost:245/~/assets/lib/bootstrap/dist/css/bootstrap.min.css net::ERR_ABORTED 404 (Not Found)
updated original post
what error message display and how to handle and solve it .
error message Warning: Failed to connect via WebSockets, using the Long Polling fallback transport. This may be due to a VPN or proxy blocking the connection.
Updated answer
I check answer links on comments reply
I can't implement or apply the following
To fix this problem, I changed in the site-configuration (/etc/nginx/sites-available) of nginx the following variables:
so can you tell me from which place i can access this path