Dependency injection in Blazor does not work while switching page
I have a classpublic class SessionState { public int id { get; set; } public bool verified { get; set; }}And in every page I have injected the class with @inject SessionState state.I want to fill...
View ArticleShow details of uncaught exception in Blazor UI
We have a customer that is using a custom browser, which doesn't allow them to open the console to see the logged error messages. Unfortunately we don't have access to their system so we need to...
View ArticleHow to check the contents of a Blazor Server batch render message sent to the...
I'm trying to optimize a Blazor Server application and I am stuck on one of the pages which contains a table with a lot of components inside.First, I switched the table to use Virtualization, which...
View ArticleThere was no runtime pack for Microsoft.AspNetCore.App available for the...
Trying to migrate from ASP.NET Core 3.1 to 5.0 using this guide provided by Microsoft.Installed SDK 5.0.100-rc.1 with runtimes. Updated project as guide says and still getting following error:There was...
View ArticleHow Can i update the live date time in c# blazor web page
I am trying to set the live DateTime in blazor webpages. I tried using Datetime.now . it's not updating the live time. I want to do it without using javascript.Any help regarding this issue?
View ArticleBase address of HttpClient is getting null for the first time in...
In my Blazor web app(auto render mode), I have added the http client as service in server project like bellow:builder.Services.AddHttpClient();I also added http client in the web assembly (client)...
View ArticleSignalR hub method is not getting called in Blazor
I'm using .Net 8.0 in Blazor.I have a server project and a client project.The server receives a notification via a controller method and this should invoke a method on the signalR hub to 'push' a...
View ArticleBlazor Server - 'Code Behind' pattern: OnInitializedAsync(): no suitable...
I have a Blazor (Server) application which runs perfectly fine, and which adheres to all rules set by Microsoft.CodeAnalysis.FxCopAnalyzers and StyleCop.Analyzers.A heavily cut-down razor page is as...
View ArticleWhat is the correct and reliable way to retrieve HttpContext in Blazor?
Let's consider a simple blazor app (the standard template) in which i need to have some info about the user which is connected, like:SessionIDIpAddressUser Identity NameUsually, I retrieve this...
View ArticleBlazor Server 'Error: server timeout elapsed without receiving a message from...
I've been trying to resolve server timeout disconnects in my Balzor Server app for many months now. I've tried lots of different things, but nothing has worked thus far. I'm just about done with the...
View ArticleCannot authenticate in a .NET 8 maui blazor hybrid app for Microsoft Entra id
I have an existing Blazor server app that connects to Microsoft Entra id and an Azure SQL database just fine. The client wanted to create a mobile app for patients. The blazor server app is just for...
View ArticleUnable to cast object of type 'System.String' to type 'System.Int32'. on...
I have tried to call a page with /somepage/{Id} where Id is a [Parameter] with a int property and the route is called as a string, it shouldn't be impicitly converting string to int? why it it wouldnt...
View ArticleAll values reset when EditForm has OnValidSubmit
I have a Blazor component. An Id is passed in but when the OnValidSubmit of the edit form fires first it runs 'OnInitializedAsync()' as expected.I set a parameter first to true on the page load and set...
View ArticleHow to generate Authenticator QR Code with Blazor .NET 8 in razor component
When using the new Identity razor components from .NET 8 you still get a link to this article:...
View ArticleBlazor OnInitialized: No suitable methods found to override
I keep getting these red squiqqlies all over my blazor server project. (I keep my code and razor files separate) The project builds find though without any errors.When I inherit each of these classes...
View ArticleHow can I open a new window without using JS
In blazor i use NavigationManager.NavigateTo(url)in order to change window location, but how can I use it to open a new tab with a specified URL without having to invoke JS on OnAfterRenderAsync()
View ArticleBlazor unhandled exception in edge, debug mode, https
Every blazor project that i run in debug mode/https/microsoft edge throws an unhandled execption.If i turn on script debugging everything works fine.Debug mode/https/chrome -> no problemsDebug...
View ArticleHow to dispose delegate in blazor or c#
Below I have attached my blazor code.private delegate Task keyActionDelegate(KeyboardEventArgs e);private KeyActionDelegate _keyActionDelegate;protected override async Task OnParametersSetAsync(){...
View ArticleTruncate text in a MudTable cell
How can I instruct a MudTable to truncate text in a cell instead of allowing the text to wrap onto the next line?Here is a code sample<MudTable Items="@data"><ColGroup><col style="width:...
View ArticleBlazoredmodal.razor.js route "_PAGENAME_content/" instead of "content/"
I have a Blazor Server App, using Blazorize (net core 6).When my page has this route:@page "/"Blazorize tries to retrieve the JS from here (which is...
View Article