这个错误通常是因为未在 index.html 文件中包含 polyfill 引起的。可以尝试在 index.html 文件中添加以下代码:
并在项目中添加 Microsoft.AspNetCore.Components.WebAssembly.Authentication 和 Microsoft.JSInterop.WebAssembly 包。这应该解决该问题。
上一篇:BlazorWASMCS1503:无法将IConfigurationSection转换为Action<T>
下一篇:BlazorWASM当用户未经身份验证时出现错误:“Cannotreadpropertiesofundefined(reading'toLowerCase')。