I created Blazor WebAssembly application with .NET Core backed and with built-in Basic Authentication. No changes in predefined template from Microsoft. I am running application on my development PC without problems. When I deploy application on the hosting server I am receiving following error:
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Could not find 'AuthenticationService.init' ('AuthenticationService' was undefined).
Error: Could not find 'AuthenticationService.init' ('AuthenticationService' was undefined).
at http://tomasoplt-001-site1.dtempurl.com/_framework/blazor.webassembly.js:1:1287
at Array.forEach (<anonymous>)
at e.findFunction (http://xxx-001-site1.dtempurl.com/_framework/blazor.webassembly.js:1:1247)
at b (http://xxx-001-site1.dtempurl.com/_framework/blazor.webassembly.js:1:2989)
at http://xxx-001-site1.dtempurl.com/_framework/blazor.webassembly.js:1:3935
at new Promise (<anonymous>)
at Object.beginInvokeJSFromDotNet (http://tomasoplt-001-site1.dtempurl.com/_framework/blazor.webassembly.js:1:3908)
at Object.w [as invokeJSFromDotNet] (http://tomasoplt-001-site1.dtempurl.com/_framework/blazor.webassembly.js:1:64218)
at _mono_wasm_invoke_js_blazor (http://tomasoplt-001-site1.dtempurl.com/_framework/dotnet.5.0.2.js:1:190800)
at do_icall (http://xxx-001-site1.dtempurl.com/_framework/dotnet.wasm:wasm-function[10596]:0x194e58)