How do I save file on form submit
Hello, As mentioned in the title, I want to save the file to the server. In the past, we were using SaveAs but in Blazor I can't get a reference of PostedFile directly. <div class="row pb-3"> <div class="col"> …
How to solve the white page problem in blazor server.
When I start my blazor server application, the page content is displayed for less than a second, then I get a blank page. When I right-click inpect in the browser I get the code : <html> **<head></head>** …
Blazor 8.0 NavigateTo throws an exception
Hello, I have a language selector that calls the following code and it works like a charm. On other hand, I want to change the language from within the MainLayout on Initialized event (async) but then the very same code throws an exception of type…
POST API Call Failing with 405 Error in Azure Static Web Apps
A Blazor WebAssembly app is configured to connect to a SQL database following the guidance in this article: How to host static web apps. The API status is healthy, and GET calls work as expected. However, POST calls to add records to the database return…
Adding Blazor Identity to existing Blazer project fails with a 'null path' exception
Hi! I have the following: .Net SDK 9 Visual Studio Community 2022 v 17.12.3 Windows v10.0.19044 Blazer Server App When I try to add the Blazor Identity "scaffolding" I get a "There was an error running the selected code generator:…
How do I fix static assets not showing on implementing project with .Net9
Hi, I am having an issue in my app when trying to implement a Nuget package. My project has the following configuration: <ItemGroup> <!-- Include the JavaScript file in the NuGet package --> <Content…
Error After Upgrading the Blazor Project WASM to .Net 8 to .Net 9
I got this errors While Upgrading my Blazor Web assembly Project to .Net 8 to .Net 9 Error Message= Source= Stack Trace: at https://localhost:7123/_framework/dotnet.runtime.o8gq1i8bk6.js:3:96088 This Error I got in console MONO_WASM:…
js Static web assets in .net9 appera blank in the browser
I can navigate to my file from the browser but the file is blank. the reference in the obj folder is correct, and the file generated inside the .nuget folder is also correct and has all the methods, but when accesing the file from the browser it appears…
Blazor ValidationMessage being conditional
Hello, I have a registration form where the users can select if they are private or company. What I need is to make the Company Name validation conditional. Meaning, if they select a company it gets enabled and if they select a private it gets disabled.…
not getting values on form submit
@page "/login" @using System.ComponentModel.DataAnnotations <h3>Login</h3> <div class="card" style="max-width: 400px; margin: auto; margin-top: 50px;"> <div class="card-body"> <h5…
Learning blazor, stuck on todo page
I was following the blazor learning path. I was on the 3. level: https://zcusa.951200.xyz/en-us/training/modules/build-blazor-todo-list/3-exercise-data-binding I created a Todo.razor page according to the instructions but when I run the project and…
Response status code: 500 login.js:18 Error: {"error":"Internal server error","details":"Login failed for user '<token-identified principal>'."}
i published a blazor web app in azure server. It starts normally but when i try to log in with the credentials and the logic i created locally (and worked) i get the error. This is my login,js: async function handleLogin(loginModel) { try { …
How to use EF Core with SQLite to update multiple records
The following code works to update the first matching record in a SQLite database, but the goal is to update all records that match TeeDate == myDateFormatted. I am trying to update multiple fields in a SQLite database with a single statement or a…
Minimal APIs in Blazor with RequireAuthorization() using Individual Account
In my .NET8 Blazor project, I added the Individual Account to manage the users. Now, in order to save the data in the database, I added some minimal endpoints like public static void MapClientEndpoints (this IEndpointRouteBuilder routes) { var…
Disable Information Logging
Hello, How do I disable the logging so I don't see those odd messages in the console (Google Chrome) ?? Whenever I run my blazor 8.0 app the following messages are displayed: Information: Normalizing '_blazor' to ' LINK Information: WebSocket connected…
Solution: Custom SignalR Endpoints (Hubs) in a Blazor Server Application using Azure B2C When Deployed to Azure
Posting this in case I need it myself... Issue: Using custom SignalR endpoints (for example a /chat hub) with Authentication in a Blazor Server application that uses Azure B2C will not work when deployed. It will work fine on your local machine (using…
Can a razor/Blazor navigation link to either?
I think I've run into another mistaken idea, but I want to double check to see if I am wrong. I had hoped that I could navigate to either a razor page (.cshtml) or a Blazor page (.razor) from the same _Layout.cshtml. Here's a code snippet illustrating…
Does using one registered app for two web apps only allow a user to login to one app at a time via EntraID?
I have two Blazor web app project: App1 & App2. Both of them are deployed to one Azure app service. App1 is deployed to root "/" and App2 is deployed to virtual application as "/app2". I'm trying to use one app registration, so…
Will my simple approach to migrating a Razor page to a Blazor component, work?
I've got another Blazor question. I started an [ASP.NET] Razor application a couple months back, because as I understood it at the time, it was the best way of getting to use Windows Authentication. And I know that it is possible to host Blazor…
How to Pass Parameters in Blazor
Hi, how can I use something like CommandParameter in Xamarin, but in Blazor for example: <div x-index="3" y-index="2"/> Then access them programmaticaly in C#. Thanks in advance