【发布时间】:2022-02-02 20:45:35
【问题描述】:
我将我的客户项目升级到 .net 6.0, 在 IIS 中部署后出现属性未定义错误, 我将 TrimmerRootAssembly 添加到 csproj
<ItemGroup>
<TrimmerRootAssembly Include="Microsoft.Authentication.WebAssembly.Msal" />
</ItemGroup>
作为这个问题的建议 Blazor WASM Net 6 Preview 4 Azure AD - There was an error trying to log you in: 'Cannot read property 'toLowerCase' of undefined' 但后来我得到另一个错误无效的 URL
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Failed to construct 'URL': Invalid URL
TypeError: Failed to construct 'URL': Invalid URL
at new u (https://devdms/_content/Microsoft.Authentication.WebAssembly.Msal/AuthenticationService.js:2:191011)
at Function.init (https://devdms/_content/Microsoft.Authentication.WebAssembly.Msal/AuthenticationService.js:2:196273)
at https://devdms/_framework/blazor.webassembly.js:1:3332
at new Promise (<anonymous>)
at Object.beginInvokeJSFromDotNet (https://devdms/_framework/blazor.webassembly.js:1:3306)
at Object.Rt [as invokeJSFromDotNet] (https://devdms/_framework/blazor.webassembly.js:1:59738)
at _mono_wasm_invoke_js_blazor (https://devdms/_framework/dotnet.6.0.1.716ng6fo9h.js:1:194546)
at https://devdms/_framework/dotnet.wasm:wasm-function[219]:0x1a129
at https://devdms/_framework/dotnet.wasm:wasm-function[167]:0xcaf7
at https://devdms/_framework/dotnet.wasm:wasm-function[166]:0xba0a
Microsoft.JSInterop.JSException:无法构造“URL”:无效的 URL TypeError:无法构造“URL”:无效的 URL
知道问题是什么吗?顺便说一句,该项目在本地工作没有任何问题
【问题讨论】:
标签: azure-active-directory blazor-webassembly .net-6.0