5,429 questions
Advice
1
vote
1
replies
28
views
Bringing over legacy vb.net code into Blazor through class library?
I have a question regarding the best method of bringing over a legacy WCF service written in vb.net into a new Blazor server-side application.
When planning out how to do this, the obvious solution ...
1
vote
0
answers
65
views
How do I fix the broken reconnect modal when upgrading a Blazor server app from .NET 9 to .NET 10?
Repro steps
Create a new Blazor server app in VS 2026, targeting .NET 9
Edit the .csproj file and change the target framework to .NET 10: <TargetFramework>net10.0</TargetFramework>
Start ...
Tooling
1
vote
1
replies
29
views
Set global CSS breakpoints in Blazor
I would like to set the CSS breakpoints globally in Blazor. What are some approaches? I prefer something that keeps the code or additional libraries quite simple.
1
vote
0
answers
45
views
How to add Authorization: Bearer <token> header to Strawberry Shake client after login in Blazor Server?
I'm using Blazor Server with Strawberry Shake 15.1.10.0 to consume a GraphQL API.
Here's the flow:
User logs in via a regular API call (SignInAsync(username, password))
The API returns a JWT token (...
Advice
0
votes
0
replies
141
views
How do I test Blazor Server from Playwright?
I have the following code to start up a kestrel server on a random port.
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting.Server;
using Microsoft.AspNetCore.Hosting.Server....
1
vote
1
answer
65
views
Blazor using InteractiveServer (for admin area /admin/*), and purely static SSR for user facing site?
Does anyone know if there's an easy way in Blazor to have:
A frontend/'user facing' site using Blazor Static SSR I don't want to include blazor.web.js, no enhanced navigation or streaming rendering ...
Advice
1
vote
0
replies
73
views
ASP.NET Core embedded Blazor
Preamble
In our current setup, I am developing a class library that acts as a plugin to our platform. This "works" because the executable scans its own directory and automatically loads ...
Advice
0
votes
3
replies
63
views
How to get values from multiple dynamically generated components in an editform
Hopefully someone can advise me how to get out of this corner I've coded myself into! I'm pretty new to Blazor and have never created a dynamically generated form before. I THOUGHT I was on the right ...
2
votes
1
answer
97
views
Blazor - StateHasChanged not updating after Radzen Button OnClick
In my Blazor server-side application, I have a component with a button that, when clicked, displays a "Loading" bar while I check to make sure a all of my required text fields are not blank.
...
0
votes
2
answers
93
views
.NET 8 Blazor - Equally dynamically sized buttons in a table without JS
I'm using .NET 8 & Blazor, and ONLY css/html/C# - no JS.
Goal: match all buttons to the largest button in any of the cells dynamically. As any button could change size (Usually becoming larger ...
0
votes
1
answer
66
views
Blazor Server LDAP Authentication Fails with “In order to perform this operation a successful bind must be completed”
I’m implementing LDAP user authentication in a Blazor Server application using Novell.Directory.Ldap (LDAPS, port 636).
The goal is to allow users to log in with their Active Directory credentials.
...
0
votes
1
answer
63
views
How do I handle empty files in Blazor Server InputFile after cancelling?
I'm coding a Blazor Server Web Application, specifically a form. I'm struggling with an InputSelect field, and I couldn't find any solution to this specific problem.
Here's a basic example I made ...
0
votes
1
answer
54
views
Blazor - Calling @code function from HTML not correctly displaying data
I've built a Blazor application, and I wrote some logic in a for-each loop to display some data. The logic is meant to go something like this: for every job type, display the jobs for that particular ...
0
votes
0
answers
32
views
Blazor - AuthorizeRouteView causing ERR_CERT_DATE_INVALID error
I am attempting to use a cascading authentication state in my Blazor application. I have utilized this custom authentication in previous Blazor applications and haven't yet come across this issue. ...
0
votes
0
answers
66
views
Blazors <EditForm> component cannot be used to submit login forms on SSR pages. [.NET 9.0 | InteractiveAuto solution]
I am using .NET 9.0, my statically rendered login page results in an error when it's submitted:
A valid antiforgery token was not provided with the request. Add an antiforgery token, or disable ...
1
vote
1
answer
74
views
Blazor - when JavaScript runs for custom context menu, app navigates back to homepage
Background
I have a Blazor server-side app I'm building which will be a music sheets website. I'm having trouble running JavaScript code for a context menu. I've started adding a custom context menu, ...
0
votes
0
answers
89
views
How can I make UI template Javascript work each time a page is loaded in Blazor SSR Application .NET 9?
I'm building a web application using a Blazor web app. The interactive render mode is set to server and interactivity location is set to "Per Page / Component".
I've integrated a ready ...
1
vote
1
answer
50
views
Correct pattern for two way binding on nested components in blazor server?
I have a series of nested components. In an inner component, I'm using a 3rd party vendor component. I then also wrap that component in an outer component, then place the outer component on the page.
...
1
vote
0
answers
58
views
Blazor Server SignInAsync works but authentication cookie is not set in browser
I'm building a Blazor Server app with a Minimal API endpoint for login. Everything seems to work server-side:
My CustomAuthenticationStateProvider correctly updates the
AuthenticationState via ...
0
votes
0
answers
99
views
Error: System.InvalidOperationException: JavaScript interop calls cannot be issued at this time
I am getting an intermittent exception in the console from the DOM:
Uncaught (in promise) Error: System.InvalidOperationException:
JavaScript interop calls cannot be issued at this time. This is
...
1
vote
1
answer
67
views
Blazor EditForm: Query parameters not binding to DateTime inputs on navigation
I can't get the check-in and check-out dates I entered on the form. When I enter the values and submit, I see the default values I assigned at the beginning(Datetime.Now and the next day), and I don'...
0
votes
1
answer
50
views
Does blazor have default redirect to login
I am attempting to implement a redirect to login on unauthorized pages. I think I have removed all hardcoded values that redirect to Account/Login?returnUrl=... but blazor insists on redirecting to ...
0
votes
1
answer
48
views
ASP.NET Core Web API not authenticating with Identity cookies from Blazor Server app
I have two ASP.NET Core applications:
Blazor Server app with Identity authentication (working correctly)
Web API that should share authentication cookies with the Blazor app
The API is not ...
0
votes
2
answers
346
views
How to use DI with Semantic Kernel plugins?
I'm trying out Microsoft's Semantic Kernel for chat completion in a Blazor app. I added a service that uses EF Core:
public interface ISearchService
{
Task<string?> GetCustomerAsync(string ...
2
votes
1
answer
55
views
MudBlazor - MudTable doesn't open MudDialog
I'm creating a MudTable with some data, and I want to open a MudDialog to edit the row data and then save it.
<MudTable T="Company" items="@_Companies" Dense=true Hover=true ...
0
votes
0
answers
91
views
Failed to Build .NET 9 MAUI Blazor Hybrid APK (Worked in .NET 8)
I’m working on a .NET MAUI Blazor Hybrid app and trying to generate an APK using the following command:
dotnet publish -f net9.0-android -c Release -p:AndroidPackageFormat=apk
My solution contains ...
0
votes
0
answers
100
views
Blazor Web App not hot reloading in Visual Studio
I created a new Blazor Web App (very important as WASM does work). I have the "Hot Reload" checkbox checked:
When I start it up, it starts up like this:
info: Microsoft.Hosting.Lifetime[14]
...
0
votes
0
answers
45
views
In my Blazor Server application, how can I setup a control property like angular's "ng-if" that I can apply to any html tag?
I'm currently building a Blazor Server application, and migrating code from an old AngularJs / ASP.NET MVC website. Part of that migration includes translating the html in the Angular pages into C# in ...
2
votes
0
answers
52
views
Blazor Dispose Order in a Component Hierarchy
I’m encountering an issue in a Blazor app where the Dispose() method of a parent component is called before the Dispose() of its child components.
Context:
We have a component called DataFence which ...
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&...
1
vote
1
answer
91
views
Validation attribute validates but does not show error message
I created a custom validation attribute:
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class MinByteLengthAttribute(string lengthPropertyName) : ValidationAttribute
{
...
0
votes
1
answer
52
views
Blazor Server Side Windows impersonation to update Active Directory fails
I am creating a Blazor server-side web application to have users update some Active Directory fields. The systems manager is making a security group to place users in so he can control what fields in ...
0
votes
1
answer
57
views
Blazor Server- IHttpContextAccessor.HttpContext.Features cannot be obtainedbecause HttpContext is null
I need to display a cookie consent message on my Blazor server page and following the solution explained on How to set consent cookie in Blazor Server. The solution works on the development machine, ...
1
vote
1
answer
157
views
FluentDataGrid with Virtualize="true" not rendering data even though ItemsProvider is returning results
I'm using Microsoft.FluentUI.AspNetCore.Components.DataGrid in a Blazor Server project. I want to use infinite scrolling with ItemsProvider and Virtualize="true".
I'm using ItemsProvider ...
1
vote
1
answer
127
views
Manually added Razor page doesn't render razor component
I started a project as .NET Minimal API - no UI whatsoever. Then I needed to add a visual tool for the API, to show what the service is doing.
For UI I wanted to use Razor pages and components, as it ...
0
votes
0
answers
20
views
Blazor server side with MS Identity (AspNetUsers) - issues with using roles
I have started a new Blazor server app via this call
dotnet new blazor --name RateWeb -au Individual --force
I can login and out and the auth mechanism works as long as I do not use
@attribute [...
0
votes
0
answers
90
views
Blazor United / Interactive Server Only / MS Entra
I'm a believer of a thin client architecture, and hence use Blazor United, and only use the Blazor Server rendering process.
I tried adding in authentication, using MS Entra, to the blazor App. this ...
2
votes
1
answer
85
views
MudSelect ToStringFunc causes flicker
Adding
@* This returns the description of the selected item based on its id *@
ToStringFunc="id => dataLoader.GetDescriptionFromList(brandModelsList, id)"
causes the MudSelect ...
0
votes
1
answer
50
views
Navigate to fails for standard authentication pages, but not for other pages [closed]
To test a problem I'm having, I have set up fresh a .NET 9 Blazor web app (server, global) with individual accounts. I added 2 pages to Pages, Page1 and Page2.
On Page1, I set up 2 buttons, one uses ...
1
vote
0
answers
50
views
Cookie / OIDC authentication enters into an infinite redirect loop
I have a Blazor server-side app (.NET 8) that connects to an external IdP. Most of the times it works fine. However, once in a while the app enters into an infinite redirect loop when the user logs in....
0
votes
1
answer
78
views
Blazor Server Side Web App and JWT tokens
I have a Blazor Server Side Web App (NOT a WebAssembly app) and I have a separate API Server. I want to use JWT tokens for all communications with the API Server from the Blazor Server Side Web App so ...
1
vote
0
answers
81
views
Blazor CascadingValue not available in descendent component
I am trying to use <CascadingValue> to pass down an instance of a component so that I can easily access its api in dependent sub components (Grid, and GridColumn for example).
Say my setup is ...
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
0
answers
66
views
Hosting and Deploying an Blazor Webapplication with Docker-Compose and Nginx has problems with SingalR and cant Connect. 405 Method not allowed
I have a Blazor web application. It running in a docker compose with 2 databases. It uses a SignalR Hub references as TacticsHub. It was working fine with Visual Studio and Visual Studio code. I could ...
0
votes
0
answers
42
views
500.13 Error trying to upload Server Side Blazor app to windows 2012 server
I'm trying to run Blazor Server App on my Windows 2012 server.
I uploaded .Net v 8 hosting package (dotnet-hosting-8.0.18-win.exe), ran it and restarted the server
Manually compiled the program, ...
0
votes
0
answers
54
views
Blazor 9.0 Two-Way Databinding not working with Custom Component
I am wrapping a TelerikDialog component to create a specifically purposed dialog box.
CustomDialog.razor
<TelerikDialog @bind-Visible="@this.IsVisible">
<DialogTitle>
...
0
votes
1
answer
113
views
Blazor Server collocated JavaScript causing crash on Blazor connection timeout due to auth CORS policy
We have a Blazor Server app that requires authorization on all its components (internal business app):
// ...
app.UseHttpsRedirection();
app.MapStaticAssets(); // <-- Static files middleware ...
1
vote
1
answer
426
views
Elsa Workflows 3 configuration for Entity Framework Core with SQL Server
The following entries where made in the Program.cs file following the Elsa Workflows instructions:
// Configure Management layer to use EF Core.
elsa.UseWorkflowManagement(management => management....
1
vote
1
answer
53
views
How to get a number pad dialog in a Blazor Server web app
I'm developing a web app for a touch panel where no keyboard is available (and I want to avoid the onscreen keyboard). I have tried a number of ways to solve this problem with no joy. My latest ...
0
votes
1
answer
92
views
JavaScript new Date() returning server time offset in Blazor Server app
I have a Blazor Server app that needs to know the local time zone for its work (it's a scheduling app that uses the DxScheduler). The strategy is to obtain the local time offset from the user's ...