Content
Generate a simple message from controller (blazor page not for razor view)
In a Blazor server application, I have implemented user authentication via cookie. In the Blazor page (not razor view) I have created a form with email and password entries as well as a button for sending the data. The method is Post and is run on the…


Logout (delete Auth-Cookie) only possible via form!
I have a Blazor server application (see my post here: https://learn.microsoft.com/en-us/answers/questions/1164837/aspnet-authentication-works-but-value-for-user-ide). Now I have implemented a cookie authentication. This works very well via a login and…


Downgrade ASP.NET Core app from .NET 6.0 to .NET Core 3.1
I have made an ASP.NET Core web application, using .NET 6.0. However, when I obtained a hosting server, I learnt that my hosting provider has installed .NET 5.0. As a result, I now have to downgrade my project from .NET 6.0 to a previous version.…
How to ignore ETag checking and fix this error
I read from and write to blob content in Azure blob storage. File is being changed (new content is getting appended to the file) at the same time while it is being downloaded. I get error in the below stream.Read() line. Which I believe is because of…
Blazor webassembly shows 405 error in localhost (and also when deployed to iis) when redirect back from payment website
I have created a blazor webaseembly project using .net 7. The blazor app redirects to an external url for payment. Once payment is done the payment status page(which is in the blazor app) should be loaded as that's the return url set while calling the…


ASPNET authentication works but value for user.Identity.Name is null
I get a null value for user.Identity.Name, but user.Identity.IsAuthenticated returns the correct value. I get my claim values too. I have only found a few posts about user.Identity.Name is null, but nothing has solved it. I have a simple login form: …


Blazor Error list stays empty
Hi there, The Error list stays empty while using blazor. The errors existing in Blazor components cause build errors but the errors aren't shown in the error list. With kind regards


In C# Blazor Server How Can I Send a 404 From A Static Method?
After much work, I finally found a way to get the IP Address of the client in Blazor Server. To do this, I had to use a site called ipify: <script> function GetAddress() { var script = document.createElement("script"); script.type…


Error RZ10012 when adding a component in blazor
Hello, I'm trying to learn Blazor with a youtube video. I have this page : MainLayout.razor @inherits LayoutComponentBase <div class="page"> <div class="sidebar"> <NavMenu /> </div> …


Blazor Server - System.InvalidCastException: Unable to cast object of type 'System.Double' to type 'System.Single'.
Hi, In my Blazor server application, I am trying to get the records from RazerReconciliation table as follows. I couldn't figure out why I am getting this error. public async Task<List<RazerReconciliations>> GetOldReconsAsync() { var…
Why does the onclick event not work, in my razor pages hosted blazor component, in .net 7.0?
I've used the following code in multiple blazor web assembly applications hosted on a razor pages page under .net 5.0 and .net 6.0 before now. An application I was forced to upgrade to .net 7.0 has rendered the onclick command completely useless What…


Access native functionalities in .Net MAUI Blazor app with embedded Angular application
Hi, We are working on creating a mobile application using .Net MAUI Blazor as technology. We were trying different approach Load dist folder of Angular application build into Blazor application Load direct angular application through weburl We were…


Blazor Wasm PWA not updating
After publishing blazor wasm app it will not updating it shows old version every time we performed hard reload and clearing cache and cookies then it will update. Please provide me solution to fix this issue


How to catch the data from local storage fastly?
I have a data in localStorage I catch them by OnInitializedAsync method in mainLayout component and pass them to many component but it spends a lot of time how to inhance it ? this is my code Notes: the number of Items in list which I catch from local…


How to edit Resources file (.resx ) after publishing in Blazor Server Project ?
Hi, I have a Blazor Server Project in which I want to add a feature to Edit resource files after publishing. Exactly after publishing, there would be a publish folder in the bin directory of the project. I need to edit the string in the resources file…


How to browse a folder in blazor server c#
The blazor server app has a folder that contains pdf files, the folder has web config file, see the below <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <directoryBrowse…


Blazor Server side app Failed to connect via WebSockets
I have a Blazor web app that used to run fine in Azure. The latest deployment does not work. It works fine locally on my development machine. Looking at the developer tools in Chrome I see this message: [2023-01-18T19:02:18.263Z] Warning: Failed to…


Get client side culture
Hi Team, I have a blazor server app and I'm using the following code to get the culture used on user's machine. selectedcultureInfo =…


MUAI Blazor App: A Blank "Screen" between splash page and login page.
Hi - We are using MAUI+ Blazor to develop our mobile App. One thing we notice is that as the app is starting, the splash screen shows, then it hides, then a very fast white flash shows right before the login page (or index page), because we are…


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…

