Click here to Skip to main content
15,943,294 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
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 .
after build success I publish it and success publish .

when publish it on IIS after that I test application I get error 404 error

so how to solve this error please ?

What I have tried:

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)
Posted
Comments
Graeme_Grant 25-Feb-23 22:41pm    
pretty clear, your publishing process has not been done correctly, several files are missing or in the wrong folder: "404 (Not Found)"
[no name] 26-Feb-23 11:03am    
ASP.NET is even more obtuse than SQL Server; if that doesn't put the fear in you.
ahmed_sa 26-Feb-23 19:05pm    
so please how to solve error on publish 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
Andre Oosthuizen 27-Feb-23 6:08am    
project throws Websocket error[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900