There are two hosting models for Blazor apps: server-side (often pre-rendered) and client-side (WebAssembly). Because of the different hosting environments, something what may work on the client-side might not on the server-side, and vice versa. Use this tag for questions specific to client-side hosted Blazor apps.
Questions tagged [blazor-webassembly]
1093 questions
0
votes
1 answer
Force Blazor WebAssembly app to open an Edge window from IE11
I am fiddling with Blazor WebAssembly to make a PoC and try to convince some people to start using it to develop Intranet web apps. However, our standard browser for Intranet content is IE11. Since Blazor WebAssembly is not supported in IE11, it may…
Mauricio Ramalho
- 819
- 1
- 8
- 14
0
votes
1 answer
Wrong redirect when login in blazor application
I use ASP.NET Core 3.1 Blazor webassembly application (the default one created by Visual Studio 2019).
I hooked up ASP.NET Identity for user management, added scaffolded Identity item (login, registration etc)
When I click Register, the application…
amplifier
- 1,521
- 1
- 16
- 34
0
votes
0 answers
How can I send a `HttpRequestMessage` from Client-side Blazor Wasm to Server-side?
I have the ASP.NET Core hosted Blazor WebAssembly project with the project structure of Client,Server and Shared.
I want to build a resolver class which will receive a HttpRequestMessage from a controller. I want to have the usage of multiple…
brstkr
- 271
- 4
- 16
0
votes
1 answer
Do Blazor Parameters carry additional overhead?
I have a blazor component that requires some external data, so I am passing it via a Parameter. My question is, should I reshape the data, creating an additional data structure, and pass that to the component, or should I just send the entire…
Todd
- 191
- 2
- 9
0
votes
1 answer
Blazor: How to invoke JavaScript after HTML is rendered
I have a custom component and when it's rendered in the browser, I need to measure its size (in JavaScript) and call back to Blazor.
How do I register JavaScript to invoke after rendering of particular component is done?
Liero
- 19,054
- 16
- 100
- 195
0
votes
0 answers
How to pass Dependency injection in Generic class
I intend to pass the HttpClient into the validator, not sure how to achieve it.
public class FluentValidator : ComponentBase
where TValidator : IValidator, new()
{
private readonly static char[]…
NSS
- 1,367
- 2
- 18
- 51
0
votes
0 answers
Using Dependency Injection in Blazor WebAssembly
I need use dependency injection in Blazor WebAssembly app. But there is a situation, my blazor app in UI layer. I will inject dependency from business layer and I need inject data layer too. But UI layer shouldn't access to data layer. How I can fix…
Hüseyin KARACAOĞLU
- 26
- 4
0
votes
1 answer
Blazor Webassembly - calling external API
I have been trying to call a separate asp.net core web api from with in a Blazor client side web assembly. I used the templates web API template with this controller. I have CORS set up in the startup.cs. I am using the standard HTTP client with…
David23g
- 213
- 1
- 2
- 6
0
votes
1 answer
How to use StackExchange.Redis in a Blazor WebAssembly app?
I tried to call ConnectionMultiplexer.ConnectAsync in a Blazor client-side component in the following way:
protected override async Task OnInitializedAsync()
{
var configuration = new ConfigurationOptions
{
AbortOnConnectFail = false,
…
Kubus
- 46
- 1
- 5
0
votes
1 answer
Blazor SignalR Error - Property Credentials is not supported
I'm using Blazor WebAssembly and trying to connect to SignalR server (ASP.NET SignalR, not ASP.NET Core SignalR) using Microsoft.AspNet.SignalR.Client. The code looks like:
var hubConnection = new HubConnection(url, queryString);
await…
zdev
- 75
- 1
- 1
- 4
0
votes
0 answers
Blazor Webassembly - request from browser to server API return 302 HTTP Code (redirect) - how to process
Blazor Webassembly App send Ajax HTTP Request to server
// blazor page code
async Task GetDataFromServerApi() {
using (var resp = await Http.GetAsync("Api/ResourceGroup").ConfigureAwait(false)) {
if (resp.StatusCode ==…
user1167761
- 283
- 2
- 14
0
votes
1 answer
Is Blazor WASM Asp.net core Hosted = Blazor server side?
I read elsewhere that when creating a Blazor server-side app, every time a user of your app interacts with the app, the server creates an instance of you app, meaning, if you have 1000 users using your app simultaneously, your hosting server will…
Robert Mrobo
- 59
- 5
0
votes
1 answer
Unable to set .net core 3.1 to Blazor Webassembly client and shared projects
I installed Visual Studio 2019 Community 16.6.1 (the latest update) at B:\Program Files (x86)\Microsoft Visual Studio\2019\Community on a Windows 10 x64 bit.
Afterwards, I also installed dotnet-sdk-3.1.300-win-x64.exe with its default path…
The Shortest Mustache Theorem
- 5,027
- 5
- 28
- 66
0
votes
0 answers
Blazor WebAssembly error when published to Azure App Service
I created a new Blazor WebAssembly project and published it on Azure App Services without changing anything from the default application created by VS 2019.
The app works fine when I tried to fetch data locally but throws the following exception…