admin管理员组文章数量:1279237
I created a Blazor Wasm standalone app + an ASP.NET Core 8 Web API with Visual Studio 2022. Both are hosted on the same server.
The app runs fine on a desktop or laptop.
But when I try to open it on mobile it fails. Load progress shows 98% and the Blazor's yellow error message at the bottom. I tried it on Android and iOS, both fails.
I searched for the error. There are many topics on it. Here Microsoft's explain the integrity check - Integrity check Here discussion about the error - integrity attribute
I tried these steps:
- deleted
bin
andobj
folders - added attributes
BlazorEnableCompression
andBlazorCacheBootResources
- deleted gz and br files
- added MIME types to
web.config
- set web application firewall to "Detection Only" in Plesk
When I compare the integrity key in the console message and in the blazor.boot.json
they are different. I tried to replace the key by adding the key in the message in blazor.boot.json
. It didn't help.
Any suggestions?
Updates
Continue my research.
Looks like the mobile version of browsers compresses the files and they have other hash.
I calculated sha-256 hash of icudt_CJK.dat file and it's the same as in blazor.boot.json (ending ...Hk=). At the same time, the console log shows another hash (ending ...FU=).
I added <EmccMaximumHeapSize>268435456</EmccMaximumHeapSize>
directive to the project file. This tag decreases the maximum memory for the app on mobile device browsers. Didn't help.
Then I tried AOT compilation <RunAOTCompilation>true</RunAOTCompilation>
. It took much longer to compile the project. Didn't help.
When I set <BlazorCacheBootResources>false</BlazorCacheBootResources>
the site doesn't work on both - desktop and mobile platforms.
I get same error
Failed to find a valid digest in the 'integrity' attribute for resource '
Uploaded the test project on another hosting, and it doesn't work on both - desktop and mobile.
本文标签: aspnet core webapiIntegrity check fails on mobile platforms in Blazor Wasm AppStack Overflow
版权声明:本文标题:asp.net core webapi - Integrity check fails on mobile platforms in Blazor Wasm App - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741299827a2371030.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论