blazor-webassembly

Automatically Attaching Access Token to HTTP Client in Blazor wasm

非 Y 不嫁゛ 提交于 2021-01-29 02:05:50
问题 I am using an open id connect identity provider for my Blazor wasm application and would like an access token to be attached to the http client as described in this article. However, whenever I create the http client and try to use it I am getting an AccessTokenNotAvailableException, even when logged in. Here is what I have: In Program.cs // Add service for CustomAuthorizationMessageHandler builder.Services.AddScoped<CustomAuthorizationMessageHandler>(); // Http client for requests to API

blazor hosted template project not working after publishing the app

无人久伴 提交于 2021-01-28 21:29:57
问题 I create a new blazor hosted project, named foo, from the dotnet CLI: dotnet new blazorwasm --hosted I run the app with dotnet run -c Release The template app works correctly when requesting https://localhost:5001 (or 5000) I then publish the app with: dotnet publish -c Release And then try to launch it with dotnet Server/bin/Release/net5.0/publish/foo.Server.dll I expect the app to lanch correctly. But I actually get a 404 response. Why is that ? Notes: It was working properly few days ago.

How can I publish a blazor client/server app to a linux web server? Don't have access to ssh and dotnet publish doesn't give an index.html

爷,独闯天下 提交于 2021-01-27 22:16:03
问题 I've built a blazor app that has no issues at the moment. When I call "dotnet publish -c Release" I get a published project, except the output is an executable file that ubuntu picks up as an octet-stream or something along the lines. If I run it, it just opens the server on localhost:5000. Copying this to my web server through cpanel did nothing -- even trying to test out a generic blazor Wasm app and publishing it gave me an index.html, but it would never actually load anything when I

Using RemoteAuthenticatorView OnLogInSucceeded gives a second AzureAD login dialog box

若如初见. 提交于 2021-01-27 18:16:18
问题 Having trouble to understand what going on and I really could use some thoughts and inputs. Please, I am not very good at describing in text what is the problem, so be gentle. I have a Blazor wasm frontend and a Azure Function backend. I do a standard, nothing special, Azure AD login. Later in code, I connect with the AzFunction using the bearer token, and it works. The AzFunction evaluates the token and identifies the user for further processing. I should mention that the AzFunction connects

Blazor Webassembly API Call Children could not be evaluated

柔情痞子 提交于 2021-01-03 06:33:07
问题 I'm trying to call an existing rest API I have with my new Blazor Webassembly app, however when I make the call I always get the error Children could not be evaluated . The API hits the breakpoint and when I step through it returns the data successfully which I can also see if I call it in postman, however the Blazor call fails. I thought perhaps it was an issue with mismatching classes, however the class structure for TeamModel is identical as it is now a shared resource. I'm new with Blazor

Blazor Webassembly API Call Children could not be evaluated

痞子三分冷 提交于 2021-01-03 06:28:52
问题 I'm trying to call an existing rest API I have with my new Blazor Webassembly app, however when I make the call I always get the error Children could not be evaluated . The API hits the breakpoint and when I step through it returns the data successfully which I can also see if I call it in postman, however the Blazor call fails. I thought perhaps it was an issue with mismatching classes, however the class structure for TeamModel is identical as it is now a shared resource. I'm new with Blazor

Blazor Webassembly API Call Children could not be evaluated

倖福魔咒の 提交于 2021-01-03 06:27:43
问题 I'm trying to call an existing rest API I have with my new Blazor Webassembly app, however when I make the call I always get the error Children could not be evaluated . The API hits the breakpoint and when I step through it returns the data successfully which I can also see if I call it in postman, however the Blazor call fails. I thought perhaps it was an issue with mismatching classes, however the class structure for TeamModel is identical as it is now a shared resource. I'm new with Blazor

Blazor Webassembly API Call Children could not be evaluated

匆匆过客 提交于 2021-01-03 06:27:33
问题 I'm trying to call an existing rest API I have with my new Blazor Webassembly app, however when I make the call I always get the error Children could not be evaluated . The API hits the breakpoint and when I step through it returns the data successfully which I can also see if I call it in postman, however the Blazor call fails. I thought perhaps it was an issue with mismatching classes, however the class structure for TeamModel is identical as it is now a shared resource. I'm new with Blazor

Blazor Startup Error: System.Threading.SynchronizationLockException: Cannot wait on monitors on this runtime

邮差的信 提交于 2020-12-13 04:09:35
问题 I am trying to call an api during the blazor(client side) startup to load language translations into the ILocalizer. At the point I try and get the .Result from the get request blazor throws the error in the title. This can replicated by calling this method in the program.cs private static void CalApi() { try { HttpClient httpClient = new HttpClient(); httpClient.BaseAddress = new Uri(@"https://dummy.restapiexample.com/api/v1/employees"); string path = "ididcontent.json"; string response =

Blazor Startup Error: System.Threading.SynchronizationLockException: Cannot wait on monitors on this runtime

心不动则不痛 提交于 2020-12-13 04:08:18
问题 I am trying to call an api during the blazor(client side) startup to load language translations into the ILocalizer. At the point I try and get the .Result from the get request blazor throws the error in the title. This can replicated by calling this method in the program.cs private static void CalApi() { try { HttpClient httpClient = new HttpClient(); httpClient.BaseAddress = new Uri(@"https://dummy.restapiexample.com/api/v1/employees"); string path = "ididcontent.json"; string response =