blazor OnInitializedAsync Unhandled exception rendering component: Cannot wait on monitors on this runtime.

125

blazor OnInitializedAsync Unhandled exception rendering component: Cannot wait on monitors on this runtime. -

// Avoid .Result, it can easily deadlock.
// This error is because it's not supported by single threaded Web Assembly

private static async Task CalApi()
{
   	var response = await httpClient.GetAsync(path); 
  	if (response.IsSuccessStatusCode) { ... }
}

Comments

Submit
0 Comments