How to call var scope = ScopeFactory.CreateScope(); and still have one...
I have situation like this: I have two Blazor components, both using dbContext and I get popular errorA second operation was started on this context instance before a previous operation completed. This...
View ArticleSupplyParameterFromQuery vs Parameter in Blazor
I already know that I could use the [SupplyParameterFromQuery(Name = "status")] from a URL parameter in Blazor.To get the value from the URL parameter using the given attribute, I had to specify the...
View ArticleBlazor Server: Custom 404 component causes RenderFragment error with...
I'm trying to use a custom 404 component in a Blazor Server app with this router setup:<Router AppAssembly="@typeof(App).Assembly" @rendermode="InteractiveServer"><Found...
View ArticleProblem converting Image to Base64 in Blazor Server
So I am trying to convert an image base64 that will be uploaded to SQL Server.Current code is:private async Task OnInputFileChange(InputFileChangeEventArgs args){ var maxFiles = 1; var maxSize =...
View Articlenet 8.0: migrating from serialization to source generators
We're in the process of migrating an existing Blazor WASM (hosted on a ASP.NET Core App) to net 8.0 and we're having several issues with trimming (and how it works). One of them is ensuring that the...
View ArticleBlazor InvokeAsync not updating state
I'm trying to update a Blazor page using a PeriodicTimer. As per documentation I'm calling InvokeAsync to update state but nothing happens.In the production case that should be a period API calling in...
View ArticleHow might I share css files between both a MAUI Blazor mobile app and a...
I have started a .Net 9.0 'MAUI Blazor Hybrid and Web App' project.The solution contains the following projects:myawesomeappmyawesomeapp.Sharedmyawesomeapp.Webmyawesomeapp.Web.ClientI am going to...
View ArticleHot reload is not working on upgraded (.NET 5 -> .NET 6) projects
With a fresh install of Windows 11 (in case it matters) and a fresh install of the Visual Studio 2022 release (not preview), new Blazor WASM projects (the default template) hot reload works fine.On the...
View ArticleProblem publishing azure static web app (blazor wasm) via devops because it's...
I have a blazor web assembly app and it references a few nuget packages that exist as Artifacts in our Azure Devops source control. This web app gets published as an azure static web app. Everything...
View ArticleBlazor server .NET 7 css @media @page isolation
One componentPrint.razor @page "/print"<h1>landscape</h1>Print.razor.css @media print { @page { size: landscape; } }Other component Print2.razor @page...
View ArticleAdd a clickable calendar icon in the header without using pseudo-elements
I'm using Syncfusion Blazor SfCalendar in my project:<SfCalendar TValue="DateTime?" ID="add-appointment-date-picker" Value="selectedDate" Min="@DateTime.Today" CssClass="appointment-input-box mt-2"...
View ArticleAdd a clickable calendar icon in the SfCalendar header without using...
I'm using Syncfusion Blazor SfCalendar in my project:<SfCalendar TValue="DateTime?" ID="add-appointment-date-picker" Value="selectedDate" Min="@DateTime.Today" CssClass="appointment-input-box mt-2"...
View ArticleHow can I implement syntax highlighting across the entire project files in VS...
In my case, while developing a Blazor web app, I found that some files have syntax highlighting and others do not. It primarily consists of HTML, C#, and JavaScript, which can occasionally be combined...
View ArticleCall js generated from typescript in blazor using IJSObjectReference
Hi I have a question about using Blazor and typescript.My typescript:namespace JSInteropWithTypeScript { export class Generator { public showAlert(): void { alert("INTEROP"); } } export function...
View ArticleDebug Outlook Web addin created in Blazor WASM
I'm creating an Outlook Web Addin. Implementation is done in Blazor WASM. The addin is working, well, but I'm not able to debug the addin when it is loaded in Outlook or neither in the browser. It is a...
View ArticleASP.NET Core Web API not authenticating with Identity cookies from Blazor...
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 appThe API is not authenticating...
View ArticleBlazor authorize attribute not detecting roles
I'm trying to use the authorize attribute with roles but it doesn't seem to be detecting the roles correctly. The first component below I'd expect to work as my user is in the system admin role but...
View ArticleHow can I render the plaintext first before the image in Blazor?
Originally, the plaintext and images were defined in a single data model class, but the issue is that it fetches everything before it renders on the client-side.Therefore, I decided to separate the...
View ArticleConditionally handle multiple ValidationMessages with a ValidateComplexType...
In a Blazor web app, I needed to conditionally handle multiple <ValidationMessages> because they're not bound to a single function.At the moment, I have two instances of...
View ArticleAzure DevOps 2019 on premise compiling Blazor with build pipeline (classic...
We have an Azure DevOps build pipeline task generating the message "Compiling assembly bitcode files with -O2 ...". See "Output from DevOps task" (identified with >>> and <<<).My...
View Article