I’m trying to deploy my Web Api + Blazor WASM Project on an ubuntu server by SSH.
My Blazor WASM project is referenced in my Web Api project and are sharing the same port.
I followed this documentation from microsoft to deploy my asp.net core application to linux using nginx:
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-5.0
I have 0 issues with the Web API. I have access to swagger and my database is correctly responding to my requests.
Unfortunately when I try to go to the Blazor website, I get stuck on the loading component and I get weird errors about the integrity of the DLL’s i’m using.
errors:
- Unknown error occurred while trying to verify integrity.
- GET http://192.168.1.102/_framework/System.Collections.Immutable.dll 403 (Forbidden)
- Failed to find a valid digest in the ‘integrity’ attribute for resource
http://192.168.1.102/_framework/System.Diagnostics.Contracts.dll’ with computed SHA-256 integrity ‘jbqRaS/StcTVS8721Y18MaPfyEnXSsdQeJ8jGaAIdNw=’. The resource has been blocked.
I get hundreds of those errors. It looks like it cannot verify the integrity of my blazor web site files.
I have absolutely no idea what is wrong with the publishing of my blazor application.
Does anyone know how to solve this or have some tips on where to search?
Thanks for your help!
2
Answers
I have found the solution by browsing the network tab and checking the blocking dlls.
My company antivirus was blocking the files. Once the antivirus deactivated the site was functioning again.
I was having the same issue but mine was solved by adding the mime type on IIS
I will put down the link on how it should be added and a picture on how it should like
by the way this was on razor and look at my version below
MIME Type that you need :
application/octet-stream
How to add the mime type