Category "blazor-webassembly"

Blazor WASM redirect to login when not authenticated - Don't show layout

I have a Blazor WASM having 2 layouts: MainLayout LoginLayout My main Index file has an Authorized attribute @page "/" @using Microsoft.AspNetCore.Authorization

"WriteLinesToFile" task was not given a value for the required parameter "File"

Error MSB4044 The "WriteLinesToFile" task was not given a value for the required parameter "File". BlazorTutorial.Client C:\Program Files\dotnet\sdk\5.0.

How to hash string in Blazor wasm?

In Net 5 Blazor client webassembly I can not use System.Security.Cryptography to compute SHA512. What are working alternatives? So that some text hashed has the

Making request without refreshing page with blazor

Please i am new to blazor, I am building a pet project and i want to make a call to the server to do so validation if the text entered into an input textbox is

Is there a way to show file uploading progress bar when uploading a file from a blazor WebAssembly (WASM) to a ASP.NET Core server (blazor hosted)

As the title says, I'm looking for a way to inform users about the file upload progress of a file uploaded from the Blazor WebAssembly (WASM) client to the serv

Blazor RenderFragment to String

I'm developing a code block component using .Net 6 Blazor wasm. I need to display the RenderFragment as string and also render the component in my html. Here is

How to call a function in a Blazor component from a Razor page

I'm creating a MarkdownEditor component for Blazor based on EasyMDE. The project on GitHub is working apart from the file upload because I can't find a way to r

Unhandled exception rendering component: '<' is an invalid start of a value for Blazor WASM

I have an API endpoint which allows anonymous. I have confirmed in Postman it is working for anonymous and authenticated users and returning proper JSON. Becaus

How does cascaded parameter Task<AthenticationState> get unwrapped and exposed as "context" in AuthorizeView and AuthorizedRouteView in Blazor WASM?

There is a an object of type AuthenticationState named "context" that is available inside AuthorizeView and AuthorizedRouteView components. This object allows t

NET5.0 Blazor WASM CORS client exception

I have a Blazor WASM app and a Web Api to get called by Blzor via HttpClient. Both programs run on the same machine (and also in production environment which sh

PayPal Checkout popup randomly closes

We are having an issue in a Blazor WebAssembly app, which is using PayPal buttons for users to Add Funds to the system's wallet. The issue is random, sometimes

Blazor Web Assembly Push Notifications

I want to add Push notifications for the Blazor WebAssembly project. The only working example is in the Blazing Pizza project, but it does not work in the Net 5

Blazor WebAssembly debug Program.cs

I've tried debugging in both vs code and vs.net 2019 and in both cases debugging everything bug Program.cs works. I'm trying to figure out why configuration isn

How do I fix a "System.Net.Http.HttpRequestException: TypeError: Failed to fetch" in Blazor WebAssembly?

The code below, runs for about fifteen seconds on the "dataFs = await _Http.GetStreamAsync(BODIST_DATA_HTTPNAME)" line before failing with a "System.Net.Http.Ht

how do I bind a blazorise RichTextEdit component to a model property

I am attempting to use a blazorise RichTextEdit component within a form. I cannot seem to get the value to be set initially to the value of a provided model pro

Blazor Cannot provide a value for property 'ScopeFactory' on type 'MyComponent' because the property has no setter

I'm writing Blazor WASM app in .NET 6. The app works as it should in Debug when running from Visual Studio 2022, but when I deploy it as a static site using dot

Visual Studio 2022 .razor code block is flickering

I am using Visual Studio 2022 Enterprise. While working with .razor files I have a strange flickering. Since a while my syntax highlighting is broken. As you ca

Blazor PWA Inputfile and send it to API Server

I am working on a system composed of a Blazor PWA app and an API Server. A user should be able to upload a file (a simple text file) through an InputFile compon

Embedding a Leaflet map on a Blazor SPA

How to Embed a Leaflet map on a Blazor SPA, using JSInterop, what objects should be defined, and how to pass data that represents the location clicked on the ma

Detecting navigation events blazor webassembly [closed]

How can I detect when URL is changed? I need the event (URL change event) to perform some specific action based on the URL.