4,807 questions
0
votes
1
answer
19
views
Mudblazor datagrid templatecolumn defining filteroperators
I have a MudDatagrid from mudblazor with a template column which I am trying to filter. The templatecolumn has a property called FilterOperators which I cannot figure out how to use properly.
I do not ...
-4
votes
0
answers
49
views
Tree view context menu is very inconsistent. The context menu sometimes only displays after scrolling and sometimes doesn't seem to dispaly at all [closed]
As mentioned in the subject line the tree view context menu is very inconsistent where sometimes the context menu display only after scrolling and at other times it shows instantly!
Please view the ...
0
votes
0
answers
30
views
Blazor WASM MSAL: Redirect to admin page after token expiration with localStorage credentials
I'm using Blazor WebAssembly with MSAL for authentication and storing Azure AD B2C credentials in localStorage. My setup is roughly like this:
builder.Services.AddMsalAuthentication(options =&...
0
votes
1
answer
123
views
Blazor with .NET 10 mode: @rendermode @(new InteractiveWebAssemblyRenderMode(prerender: false))
I am updating a Blazor web assembly project from .NET 9 to .NET 10, and noticed a change in behavior with the following line of code:
@rendermode @(new InteractiveWebAssemblyRenderMode(prerender: ...
0
votes
1
answer
58
views
Why are my context menus for the Client, Site and Division not displaying
As mentioned in the subject line why are my context menus for the Client, Site and Division not displaying when running the code shown below! I've only includes the relevant sections below:
<div @...
0
votes
1
answer
68
views
"crawled - currently not indexed" Error when using Blazor client-side
I have an ASP.NET Core Razor Pages website where most pages are purely server-rendered, and they’re all indexed by Google just fine.
However, I have three pages that contain Blazor WebAssembly ...
0
votes
0
answers
28
views
Add InteractiveServer page to InteractiveAuto webapp
I have created a Blazor webapp which was created using Auto interactivity (and individual authentication). Working to add to the webapp I have understood that InteractiveAuto means using ...
1
vote
3
answers
119
views
Can I "soft reload" a Blazor page component without a full browser reload?
I'd like to reload a Blazor page component without triggering a full browser reload.
Using NavigationManager to reload works, but I'm looking for a softer approach:
The page itself stays loaded, so ...
0
votes
0
answers
51
views
How to use JSExport in two projects in the same web+C# app
I started with a working app with static exported C# methods like
[SupportedOSPlatform("browser")] // suppress CA1416 "only supported on: 'browser'"
public static partial class ...
Best practices
1
vote
2
replies
91
views
How to handle errors in Blazor WebAssembly?
I have been using this ServiceResponse model to communicate data between an Azure Function backend and a Blazor WebAssembly frontend:
public class ServiceResponse<T>
{
public T? Data { get; ...
1
vote
0
answers
66
views
Why does the MudBlazor Tree View display the edit view on the 1st click but all subsequent clicks only change the URL & does not update the view
As mentioned in the subject line I wanted to know why the MudBlazor Tree View display the edit view on the 1st click but all subsequent clicks only change the URL & does not update the view. ...
0
votes
1
answer
85
views
How can I send my refresh tokens via httponly cookie to standalone blazor WebAssembly?
I've been trying for a couple days to implement refresh tokens into my ASP.NET Core Web API, but to no avail.
I've currently got an ASP.NET Core Web API that allows someone to log in with a username ...
1
vote
0
answers
59
views
Debugging not working with Blazor WASM app served though MVC app when ran through Docker-Compose
I created an ASP.NET Core MVC application that serves up a Blazor WASM application. I then want to Dockerize it and run it with docker-compose so I can run it with some other stuff so the other ...
2
votes
1
answer
77
views
Conditionally rendering HTML in Blazor
If I use an if statement to render a block of HTML in a Blazor WebAssembly app, does it actually get rendered and not displayed if the condition is false?
Something like this:
@if(isSectionVisible)
{
...
0
votes
1
answer
116
views
Blazor virtualization for items with different sizes
Blazor supports virtualization but items need to have same height. For most cases it's okay, but for example for chats where amount of messages can be high and messages have different heights due to ...
-1
votes
3
answers
211
views
Avoiding null warnings in Blazor, default! or required per [Inject] service dependency injection
What is Microsoft's recommended approach to avoid compiler warnings about possible null values when injecting dependencies into Blazor components, What are the technical implications of initializing ...
0
votes
1
answer
43
views
How do I pass a cascading parameter to child content in Blazor WASM
I have the following
ParentItem.razor -
<CascadingValue Value="Name">
@ChildContent
</CascadingValue>
The parent.razor.cs has a public string parameter called Name.
ChildItem....
0
votes
2
answers
139
views
HttpClient in Blazor WebAssembly Standalone
When I create a new Blazor WebAssembly Standalone project, it automatically adds an HttpClient in Program.cs -- see below:
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(...
0
votes
1
answer
72
views
MONO_WASM: WebAssembly resource does not have the expected content type "application/wasm", so falling back to slower ArrayBuffer instantiation
I have a year old standalone WebAssembly application. When I run it from CLI dotnet run I get the warning, when I run it from VS2022 I still get the warning but also get dotnet loaded resources in ...
0
votes
0
answers
55
views
Add a clickable calendar icon in the SfCalendar header without using pseudo-elements
I'm using Syncfusion Blazor SfCalendar in my project:
<SfCalendar TValue="DateTime?"
ID="add-appointment-date-picker"
Value="selectedDate"
...
0
votes
0
answers
32
views
HttpMethod.Post gives an 401 error even though it was supplied with credentials [duplicate]
I am trying to create a post method to create a data that pushes to my DB
this is my service to call my API:
public async Task CreateTest(TestsDto testDto)
{
try
{
var request = new ...
-1
votes
2
answers
89
views
Web app freezes when trying to use Layout in a razor class library from that class library
In a Blazor 9 web app, I have a page in a razor class library and I can navigate to it fine from the main Blazor web app.
However, when I add a Layout component in that class library and try to use it,...
0
votes
1
answer
96
views
Is it possible to use @rendermode="InteractiveAuto" in a .NET 9 Blazor Web App using a single .net project?
I would like to create a Blazor Web App that first renders components using SSR until the Wasm components can be downloaded then future requests should render the Wasm component.
My application seems ...
0
votes
1
answer
163
views
Why does my OnAfterRenderAsync get called 5 times when I call StateHasChanged 5 times
The Blazor docs say this:
If a component calls StateHasChanged five times in a row in a loop, the component only renders once.
Ref: https://learn.microsoft.com/en-us/aspnet/core/blazor/components/...
1
vote
0
answers
82
views
How to configure and distribute an Excel add-in created with Blazor?
I'm creating for my company an Excel add-in using Blazor following the code I found on GitHub.
Also, I have created an account on the Microsoft Development Program (MDP) with my company account.
...
0
votes
0
answers
39
views
Global Error handler for Blazor hybrid render mode
I'm trying to understand if is possible to have one <ErrorBoundary> for my whole .NET 8 Blazor server application. The "rendermode" is not globally set to be "InteractiveServer&...
0
votes
0
answers
79
views
Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self'"
In my Blazor WASM app, I have a CSP header defined in the web.config file like this:
<add name="content-security-policy"
value="style-src 'self' sample.com sample2.com kendo....
0
votes
1
answer
77
views
Blazor server call keeps returning log in page even after user is authenticated
Goal: simple Blazor app, in which, after the user has logged in and their authentication state is confirmed, I call the backend to load some user data.
Process: I launch the app locally from Visual ...
0
votes
0
answers
35
views
Why Cant I Intercept the MSAL.JS call to authorize my Entra ID User from Blazor WASM so that I can append the ui_locales query param?
We have developed a Blazor Web Assembly App (WASM) that uses the standard Microsoft.AspNetCore.Components.WebAssembly.Authentication library to handle Authentication
{
options.ProviderOptions....
0
votes
0
answers
107
views
Blazor web app vs Blazor web assembly standalone App
I started learning C# a while ago with Tim Corey's course and while it is a bit outdated in Visual Studio version, I never had a problem similar to this.
I wrote a simple piece of code which takes a ...
0
votes
1
answer
77
views
How to figure out which module in Blazor Webassembly client causes the exception
I have a hosted Blazor WebAssembly app with the render mode set to InteractiveAuto. When I start the app, I intermittently (but more often yes than no) get the following exception in the development ...
1
vote
2
answers
109
views
Blazor WebAssembly not applying culture to DateTime formatting after changing culture
I recently migrated my Blazor project from Blazor Server to Blazor WebAssembly. In the Blazor Server version, when I changed the culture (e.g., CultureInfo.CurrentUICulture = new CultureInfo("fa-...
3
votes
1
answer
188
views
Adding a singleton in a blazor Web Assembly project
I am currently learning Blazor web assembly. I have created a Blazor web assembly sandbox on .NET 6. I want to create an object that can't be reloaded on the entire lifecycle of the app, in order to ...
0
votes
1
answer
62
views
Using Blazor Web App with ASP.NET Zero Framework Instead of Angular or MVC
Is it possible (and recommended) to use Blazor as the front-end in ASP.NET Zero?
Has anyone successfully integrated Blazor web assembly with ASP.NET Zero backend, and if so, what approach did you take?...
1
vote
0
answers
112
views
OnInitializedAsync method is hit again when click submit button of a EditForm
I work with an ASP.NET Core 8.0 Blazor server app and Razor pages. In there I have an OnInitializedAsync method to get data from a SQL Server for changing purposes.
Now in this version this method ...
2
votes
1
answer
149
views
MudBlazor Data Grid show index with arrow when persist data
I'm using MudBlazor's Data Grid and I'm implementing a method to save the search, sort, and pagination status. When you leave the page and return, the table displays the last search, sort, and ...
1
vote
1
answer
49
views
LoginAsync Always Returns False in Blazor WebAssembly with ASP.NET Core 9 Cookie Authentication
I'm building a full-stack app using Blazor WebAssembly and ASP.NET Core 9 Web API. For authentication, I've transitioned from localStorage token management to HttpOnly cookie-based authentication.
...
1
vote
1
answer
366
views
AADSTS500208 "domain is not a valid login domain" error when migrating Blazor WASM from Azure AD B2C to Entra External ID
Problem
We're migrating a Blazor WebAssembly application from Azure AD B2C to Entra External ID and encountering authentication issues. Users can't sign in or sign up, receiving the error:
ServerError:...
0
votes
0
answers
38
views
Blazor Web app, understanding of Authentication flow
I am using blazor Web App for a project, I am using InteractiveAutoRenderMode and in my server project i have controllers that i am calling from client project. i have written a ...
2
votes
0
answers
76
views
Blazor auth not always synchronizing
I have a Blazor web app, where I am using static SSR and wasm (but not interactive server).
I of course have a server project and a wasm project.
I have setup auth with Appwrite and written of own ...
0
votes
0
answers
45
views
Wizard forms on a static page blazor
I recently started writing the implementation of registration in my Blazor web app, there were no problems with the registration itself (considering the fact that I used templates from Microsoft).
I ...
0
votes
1
answer
65
views
Child component not updating property
So in the razor.cs there is a method that imports an xml and displays it in the child components. How it is rendered is shown in the .razor, but for some reason only the Models-property in the child ...
2
votes
1
answer
92
views
Using a component in a for-loop gives 'Index was outside the bounds' error
Given following code (for Home.razor and WebAssembly blazor app that uses FluentUI for net8.0)
@page "/"
<ol>
@for (int i = 0; i < Stuff.Length; i++)
{
<li>&...
1
vote
1
answer
51
views
After input all the values still showing username and password required in Blazor webassembly
I'm working with a Blazor web assembly project, but having an issue while submitting form after inputting email and password still asking for email and password
Email is required
Password is required
...
0
votes
0
answers
21
views
multilevel Hierarchy on button click on TelerikGrid
I am trying to build multilevel Hierarchy TelerikGrid by hiding the default button and adding a custom Link. If a parent has sub list then the custom button will appear and on clicking the sub list ...
0
votes
0
answers
54
views
Cannot debug Blazor WebAssembly applications when using docker compose orchestration in Visual Studio 2022
I cannot get the Blazor WebAssembly debugging to work when using Docker Compose orchestration in Visual Studio 2022
The reproduction is quite simple:
Create a sample app using the Blazor Web App ...
1
vote
1
answer
42
views
How can I wire up a paste_preprocess callback in TinyMCE Blazor?
I'm using TinyMCE in a Blazor WASM app using the TinyMCE Blazor integration, but would like to wire up the paste_preprocess callback so I can pre-process the content copied from the clipboard, before ...
1
vote
1
answer
110
views
Azure Static Web App not recognizing staticwebapp.config.json in Blazor WASM app when deployed via Azure Pipelines
I have a standalone Blazor WASM app that I am trying to deploy to an Azure Static Web App resource via CI/CD.
My app deploys, but my navigationg fallback rules aren't working. I have a staticwebapp....
0
votes
0
answers
39
views
Blazor WebAssembly + MSAL: Token not refreshing when using localStorage for cacheLocation
I'm working on a Blazor WebAssembly app that uses MSAL package Microsoft.Authentication.WebAssembly.Msal version 8.0.13 for authentication. I configured the MSAL cache to use localStorage by setting ...
0
votes
0
answers
77
views
Conditional Validation Blazor Wasm
I have a Blazor Wasm app that I use with an ASP.Net Core API.
I have one page with a form that I use Blazors built in validation with (data annotations and so on).
However now I have added a new ...