Questions tagged [blazor-webassembly]

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.

1093 questions
4
votes
1 answer

When to have more than one root components in Blazor?

In the main method of dotnet core blazor web assembly app there is a WebAssemblyHostBuilder class which builds the host for the blazor application. In that class there is a public property called RootComponentMappingCollection which one can add the…
4
votes
1 answer

Blazor WebAssembly - Best practices for User Accounts and Identity Server

I am trying to create a basic User Management module in my software and I have followed this guide to create the…
4
votes
2 answers

"Cannot read property '_blazorFilesById' of null error" with Blazor InputFile component

I've started getting this error from my Blazor WebAssembly app: "Cannot read property '_blazorFilesById' of null error" with Blazor app I'm assuming that's related to the InputFile component I'm using, which has been working fine. I've tried…
tomRedox
  • 18,963
  • 13
  • 90
  • 126
4
votes
3 answers

How to set ValidationMessage.For Property dynamically in Blazor?

This Section of the Docs describes, how to display Validation Messages. How can the ValidationMessage.For Property be set dynamically? Since For is of type…
LuckyLikey
  • 2,818
  • 1
  • 26
  • 47
4
votes
1 answer

C# Blazor WebAssembly: Argument 2: cannot convert from 'void' to 'Microsoft.AspNetCore.Components.EventCallback'

I'm new to blazor C# and trying to make a simple countdown timer website. My website consist of: Text to display the timer Start and stop button Buttons to set the timer I'm having a problem in the buttons to set the timer. When i click on it, it…
4
votes
0 answers

Blazor dotnet watch run

I have setup a Blazor WebAssembly application using Visual Studio Code and .NET 3.1.1. It has an ASP.NET Core host. I am attempting to automatically update code on both the server and the client at the same time using dotnet watch run but I am…
cbandara
  • 81
  • 2
  • 10
4
votes
0 answers

Problem with Client reference 'There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm''

I am trying to make a shared class library in .NET 5 with a .proto file in it and 3 dependencies: Google.protobuf Grpc.Aspnetcore Grpc.Tools When I add a project reference from the server project there is no problem whatsoever. I know this for…
4
votes
1 answer

Blazor Wasm with AAD B2C: SignUpSignIn userflow - reset password, how to catch AADB2C90118

I am working on a Blazor Wasm app which uses AAD B2C. The AAD B2C is set up correctly, with different user flows. The SignUpSignIn has the "Forgot your password" link which is not working out of the box. As I read the app needs to catch the error…
4
votes
1 answer

MediatR Notifications with Blazor (WASM) - Event handler does not update UI

I'm trying to hook up MediatR in a client-side Blazor application purely to handle event notifications between components. The event is published, and it gets picked up by a separate component with a handler, but I can't update the UI from the…
pfeds
  • 1,813
  • 4
  • 28
  • 42
4
votes
2 answers

How to connect Blazor WebAssembly to DataBase

I recently started developing a Blazor WebAssembly app, and now I'm settling on a database connection. All lessons and instructions say that you need to enter information into the Startup.cs file and appsettings.json, but these files are not in the…
4
votes
4 answers

Getting The page was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint '.well-known/openid-configuration'

So I have an ASP.Net Core Hosted Blazor Web Assembly project using Identity Server 4 to manage my logins and registration and when I am debugging and I try to log into my app, the endpoint '.well-known/openid-configuration' is served over HTTPS but…
4
votes
1 answer

Blazor wasm invoke javascript, pass large array is very slow

I have a blazor wasm app. In that I am invoking a javascript function that receives an array of double. This is very slow, especially when the array is large. For a test see the code below: javascript ("test.js"): function testSumArray(array) { …
Erik Thysell
  • 632
  • 7
  • 21
4
votes
0 answers

Identity login function stopped working Blazor Wasm Asp.net core hosted

I've been playing with a blazor wasm asp.net core hosted project for a few weeks now, yesterday I added a few controllers on the server side and everything was working fine (Also logging in).. Came back today and identity server just stopped logging…
4
votes
1 answer

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

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,…
4
votes
2 answers

Cannot debug client side blazor

Ok so plain and simple, I cannot seem to debug client-side blazor. I have added "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}" As suggested here Blazor WebAssembly 3.2.0 Preview 3…
Gaz83
  • 1,487
  • 1
  • 21
  • 48
1 2
3
72 73