Uploaded June 2025 | Updated November 2026, 15 hours ago
In Episode 82 of The Blazor Puzzle, Carl Franklin and Jeff Fritz go back to basics with a critical Blazor Server concept that trips up even seasoned devs:
Why is my shared state bleeding across users?!
They walk through a real-world scenario where a counter value is moved into a service for state persistence β and everything worksβ¦ until multiple users open the app and start seeing each otherβs data. π±
π¦ The culprit?
Using AddSingleton for the state service in a Blazor Server app.
π The fix?
Switching to AddScoped, so each user gets their own instance.
π What Youβll Learn:
βοΈ The difference between AddSingleton, AddScoped, and AddTransient in Blazor Server
βοΈ Why singletons are dangerous for per-user state in server-side apps
βοΈ How to isolate user state using a scoped service
βοΈ Why Blazor Server apps behave differently than Blazor WebAssembly apps
π‘ A perfect reminder for anyone getting started with shared state or building cart-like behavior in Blazor.
π Resources & Code:
github.com/BlazorPuzzle/Puzzle-82
π Want to level up your Blazor testing skills? Subscribe & join the puzzle! π§©
Get Started Today β Free 30 Day Trial
dxpr.es/NUGET
dxpr.es/FREE-TRIAL
Pricing and Online Demos
dxpr.es/BUY
dxpr.es/DEMOS
We Are Here to Help
dxpr.es/SUPPORT
Follow DevExpress on Social Media
dxpr.es/FACEBOOK
dxpr.es/TWITTER
dxpr.es/BLOGS
Review Customer Testimonials
dxpr.es/TESTIMONIALS
dxpr.es/MARKETPLACE
#DevExpress #Blazor #DotNet #BlazorServer #DependencyInjection #ScopedVsSingleton #WebDev #BlazorPuzzle #StateManagement
In Episode 82 of The Blazor Puzzle, Carl Franklin and Jeff Fritz go back to basics with a critical Blazor Server concept that trips up even seasoned devs:
Why is my shared state bleeding across users?!
They walk through a real-world scenario where a counter value is moved into a service for state persistence β and everything worksβ¦ until multiple users open the app and start seeing each otherβs data. π±
π¦ The culprit?
Using AddSingleton for the state service in a Blazor Server app.
π The fix?
Switching to AddScoped, so each user gets their own instance.
π What Youβll Learn:
βοΈ The difference between AddSingleton, AddScoped, and AddTransient in Blazor Server
βοΈ Why singletons are dangerous for per-user state in server-side apps
βοΈ How to isolate user state using a scoped service
βοΈ Why Blazor Server apps behave differently than Blazor WebAssembly apps
π‘ A perfect reminder for anyone getting started with shared state or building cart-like behavior in Blazor.
π Resources & Code:
github.com/BlazorPuzzle/Puzzle-82
π Want to level up your Blazor testing skills? Subscribe & join the puzzle! π§©
Get Started Today β Free 30 Day Trial
dxpr.es/NUGET
dxpr.es/FREE-TRIAL
Pricing and Online Demos
dxpr.es/BUY
dxpr.es/DEMOS
We Are Here to Help
dxpr.es/SUPPORT
Follow DevExpress on Social Media
dxpr.es/FACEBOOK
dxpr.es/TWITTER
dxpr.es/BLOGS
Review Customer Testimonials
dxpr.es/TESTIMONIALS
dxpr.es/MARKETPLACE
#DevExpress #Blazor #DotNet #BlazorServer #DependencyInjection #ScopedVsSingleton #WebDev #BlazorPuzzle #StateManagement









![The Blazor Puzzle 40 - : Fixing Blazor 2FA QR Code Generation & Server-Side Form Binding
π Blazor Puzzle #40:
This week, we solved two tricky Blazor challenges:
β
Fixing Two-Factor Authentication (2FA) QR Code Generation
β
Correcting Server-Side Form Binding with [SupplyParameterFromForm]
π Solutions:
1οΈβ£ Blazor Server-Side Form Issue
Problem: Form values reset on submit due to missing binding
Fix: Used [SupplyParameterFromForm] to persist values across postbacks
2οΈβ£ Missing 2FA QR Code
Problem: QR code not displaying even after adding JavaScript per Microsoftβs docs
Solution Pending! Can you solve it? π΅οΈ
π© Think you know the answer?
Email blazorpuzzle@appvnext.com with Puzzle #40 in the subject.
π¬ Whatβs your best approach for injecting JavaScript in Blazors server-side authentication pages? Letβs discuss in the comments!
π Subscribe for more Blazor debugging, authentication best practices, and .NET tips!
Get Started Today β Free 30 Day Trial
http://dxpr.es/NUGET
http://dxpr.es/FREE-TRIAL
Pricing and Online Demos
http://dxpr.es/BUY
http://dxpr.es/DEMOS
We Are Here to Help
http://dxpr.es/SUPPORT
Follow DevExpress on Social Media
http://dxpr.es/FACEBOOK
http://dxpr.es/TWITTER
http://dxpr.es/BLOGS
Review Customer Testimonials
http://dxpr.es/TESTIMONIALS
http://dxpr.es/MARKETPLACE
#DevExpress, #devexpress_blazor #blazor #microsoft #carlfranklin #Jefffritz #Blazor #DotNet #CSharp #WebDevelopment #Microsoft #BlazorServer #Authentication #CodingChallenge The Blazor Puzzle 40 - : Fixing Blazor 2FA QR Code Generation & Server-Side Form Binding](https://i.ytimg.com/vi/rhfqX7VUhRw/mqdefault.jpg)
