The Blazor Puzzle 82 - Why Your Blazor Server App Shares Data Across Users (And How to Fix It) @DeveloperExpress
The Blazor Puzzle 82 - Why Your Blazor Server App Shares Data Across Users (And How to Fix It)  @DeveloperExpress
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
The Blazor Puzzle 82 - Why Your Blazor Server App Shares Data Across Users (And How to Fix It)Whats New in v24.1 for ReactCode It With AI - Multi-Step Workflows (ep.24)Spreadsheet Control for WinForms: Sort and Filter by Color in the User InterfaceAdding AI Chat functionality into a DevExtreme App.PDF upload support and signing in MAUICode it with AI - Claude Utils (ep.41)The Blazor Puzzle 81 - Build Dynamic Dashboards with Blazor’s DynamicComponentThe Blazor Puzzle 30 - Why Does Adding a Parameter Break CSS Styling?The Blazor Puzzle 67 - Fixing Blazor Date Input Issues: The Simple Solution You Didn’t Know!The Blazor Puzzle 40 - : Fixing Blazor 2FA QR Code Generation & Server-Side Form BindingWhats New for 24.1 in Blazor
DevExpress |

The Blazor Puzzle 82 - Why Your Blazor Server App Shares Data Across Users (And How to Fix It)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER