Questions tagged [blazor-client-side]

The client side execution of commands in the browser; apart from the server side code.

Blazor is a web framework designed to run client-side in the browser on a WebAssembly-based .NET runtime (Blazor WebAssembly) or server-side in ASP.NET Core (Blazor Server). Regardless of the hosting model, the app and component models are the same. ASP.NET Core Blazor hosting models

784 questions
8
votes
1 answer

Enforcing Blazor webassembly to use Newtonsoft.Json on client side

In Blazor webassembly is there a way to enforce the use of Newtonsoft.Json serlialization for httpclient and methods such as GetJsonAsync, PostAsJsonAsync etc. Or the only way is to write helper methods and use GetAsync and then serialize the…
mko
  • 4,825
  • 8
  • 45
  • 97
8
votes
3 answers

Getting 'TypeError: Failed to fetch' error when trying to call AspNetCore Restful API from Blazor Wasm

I'm getting a 'TypeError: Failed to fetch' error when trying to call my AspNetCore Restful API from Blazor Wasm. I can call it from Postman, and it works fine. My Environment: Microsoft Visual Studio Community 2019 Preview Version 16.6.0 Preview…
8
votes
4 answers

How to map fallback in ASP .NET Core Web API so that Blazor WASM app only intercepts requests that are not to the API

I have a Blazor WebAssembly solution with a client project, server project and shared project, based on the default solution template from Microsoft. I'm editing and debugging in Visual Studio 2019 preview with Google Chrome. Out-of-the-box, the…
8
votes
2 answers

Authorization issue when use [Authorize] attribute in page in client blazor app

When i use @attribute [Authorize] on a razor page in blazor Client app it give me this error System.InvalidOperationException: Cannot provide a value for property 'AuthorizationPolicyProvider' on type …
Shinichi Kudo
  • 216
  • 3
  • 11
7
votes
1 answer

Blazor 3.1 nested onmouseover events

I have an issue with nested divs both having onmouseover/onmouseout event. I have a nav menu which pops open from the side of the screen triggered by an onmouseover event. Inside this nav menu, I have a submenu which pops open which is also…
7
votes
2 answers

Displaying the local machine camera feed in a Blazor Web Assembly app

I've distilled my issue down to a boilerplate Blazor Web Assembly app. The project is straight out of the wizard, with the below code added. I've changed the Index.razor page to this: @page "/" @inject IJSRuntime JSRuntime; @using…
Newbee
  • 143
  • 1
  • 7
7
votes
1 answer

How to add additional claims to Blazor WebAssembly 3.2.0 Preview 3 application

I created a Asp.Net Core hosted Blazor webassembly 3.2.0 Preview 3 application with the authentication option of In-App accounts. I then added a few additional attributes to the ApplicationUser class, and migrated these changes to the database. I…
user2202866
  • 61
  • 2
  • 13
7
votes
6 answers

How to acess the appsettings in blazor webassembly

I currentying trying to save the api url in an appsettings. However, the configuration.Propertiers seems to be empty. I am not sure how to get the setting. in program.cs: public static async Task Main(string[] args) { var builder =…
7
votes
1 answer

Blazor Client Side (WASM) Application Insights

Does Application Insights SDK work for Blazor WASM? I'm trying connect my application but it doesn't send any metrics. Even when instantiating TelemetryClient it's simply hanging.
idizh
  • 71
  • 4
6
votes
1 answer

How to authorize user's role in client side of blazor wasm?

Environments Asp.Net Core 5.0 Blazor WebAssembly App (Asp.Net Core Hosting) Asp.Net Core Identity (with Identity Server 4) Problem I want to use Role-based authorization between Server side and Client side. I can login correctly and…
user14622931
6
votes
4 answers

How can I run offline database usage in Blazor WebAssembly-PWA?

I have a Blazor WebAssembly ASP.NET Core hosted - PWA application and wanna run it also offline. The database is currently built with SQLite and EF-Core. Is it possible to add offline functionality? I have read about IndexedDB but don't actually…
brstkr
  • 271
  • 4
  • 16
6
votes
0 answers

In Blazor WebAssembly, how to include hash in static file link/script reference in index.html for cache-busting?

In server-side ASP.NET, we can do asp-append-version=true on static assets in a .cshtml file in order to automatically append a hash of the file to the filename. But, in Blazor WebAssembly, this doesn't work, which makes sense because I have a…
Patrick Szalapski
  • 7,020
  • 9
  • 49
  • 98
6
votes
1 answer

Blazor client WASM launch configuration for VSCode

Where can I find an example of the .NET Core Launch (Blazor Standalone) launch configuration? And before you refer me to this https://docs.microsoft.com/en-us/aspnet/core/blazor/debug?tabs=visual-studio-code&view=aspnetcore-3.1#vscode I have already…
Archon
  • 65
  • 8
6
votes
1 answer

How to configure multiple HttpClient instances with different configurations in Blazor WebAssembly

I'm trying to configure multiple API urls in the Program.cs class in Blazor WASM. I'm not seeing an AddHttpClient extension like in server-side. Was wondering if anyone had an alternate solution for this? Here's what I have so far: var firstURI =…
bob82
  • 195
  • 1
  • 11
6
votes
2 answers

How to obtain the target element on click event in Blazor

I want the exact target on which the click event has been triggered in ASP.NET Core blazor. Is this achievable?
Prem Kumar
  • 101
  • 1
  • 6
1
2
3
52 53