Skip to content

Could not load settings from '_configuration/BlazorApp1.Client' #21327

@danroth27

Description

@danroth27

Repro steps:

  • Create a Blazor WebAssembly app that is ASP.NET Core hosted and with auth
  • Set the Client project as the startup project (yes, I know this isn't the normal thing to do, but the failure case looks weird)
  • Run the app

Actual result:

blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
      Unhandled exception rendering component: Could not load settings from '_configuration/BlazorApp7.Client'
      Error: Could not load settings from '_configuration/BlazorApp7.Client'
          at Function.createUserManager (https://localhost:44337/_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js:1:5893)
          at async Function.initializeCore (https://localhost:44337/_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js:1:5027)
Microsoft.JSInterop.JSException: Could not load settings from '_configuration/BlazorApp7.Client'
Error: Could not load settings from '_configuration/BlazorApp7.Client'
    at Function.createUserManager (https://localhost:44337/_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js:1:5893)
    at async Function.initializeCore (https://localhost:44337/_content/Microsoft.AspNetCore.Components.WebAssembly.Authentication/AuthenticationService.js:1:5027)
  at System.Threading.Tasks.ValueTask`1[TResult].get_Result () <0x2ea2640 + 0x00034> in <filename unknown>:0 
  at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync (Microsoft.JSInterop.IJSRuntime jsRuntime, System.String identifier, System.Object[] args) <0x2c93998 + 0x000e4> in <filename unknown>:0 
  at Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationService`3[TRemoteAuthenticationState,TAccount,TProviderOptions].EnsureAuthService () <0x2c92f90 + 0x000fc> in <filename unknown>:0 
  at Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationService`3[TRemoteAuthenticationState,TAccount,TProviderOptions].GetAuthenticatedUser () <0x2c926d8 + 0x000d2> in <filename unknown>:0 
  at System.Threading.Tasks.ValueTask`1[TResult].get_Result () <0x2ea6660 + 0x00034> in <filename unknown>:0 
  at Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationService`3[TRemoteAuthenticationState,TAccount,TProviderOptions].GetUser (System.Boolean useCache) <0x2c482e0 + 0x00138> in <filename unknown>:0 
  at Microsoft.AspNetCore.Components.WebAssembly.Authentication.RemoteAuthenticationService`3[TRemoteAuthenticationState,TAccount,TProviderOptions].GetAuthenticationStateAsync () <0x2c471a0 + 0x000b6> in <filename unknown>:0 
  at Microsoft.AspNetCore.Components.Authorization.AuthorizeViewCore.OnParametersSetAsync () <0x2df1450 + 0x00126> in <filename unknown>:0 
  at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion (System.Threading.Tasks.Task task) <0x2df2038 + 0x000da> in <filename unknown>:0 
  at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync () <0x2bd8fb0 + 0x001d8> in <filename unknown>:0 
  at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask (System.Threading.Tasks.Task taskToHandle) <0x2df4bb0 + 0x000b6> in <filename unknown>:0 

Metadata

Metadata

Assignees

Labels

✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Status: Resolvedarea-blazorIncludes: Blazor, Razor Componentsfeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssembly

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions