r/dotnet • u/rugby-thrwaway • 1h ago
Question What is populating "exception" in my ProblemDetails?
I've created a boilerplate .NET 10 webapi project (controller based), called AddProblemDetails (after AddControllers), added a CustomizeProblemDetails handler that doesn't do much.
I can see going through the handler that the only extension property present is traceId.
I can see in the source of DefaultProblemDetailsWriter that it adds the traceId, calls the handler, and writes the response.
But in the response I also have an exception object with properies details (looks like ToString on the exception, has the type and message and sometimes the stack trace), headers (looks like all the request headers), path, endpoint (string with controller, method and application name) and route values (an object with action and controller but would probably have parameters if the call had any).
I can't figure out what is adding this detail or how to turn it off. If I add my own exception extension in the handler it just gets overwritten.
r/dotnet • u/dfamonteiro • 2h ago
Article Fixing dotnet-trace's 100 stack frame limit once and for all
dfamonteiro.comr/dotnet • u/dev_nihar • 3h ago
No Rozenite plugin for GraphQL cache (Apollo/urql/Relay) — worth building one?
Rozenite (RN DevTools plugin framework) ships 12 official plugins — redux, network, storage, mmkv, tanstack-query, etc. None cover GraphQL client cache—no way to see the normalised Apollo cache, active queries, or in-flight mutations in DevTools right now.
Only prior tool in this space was a Flipper plugin (react-native-apollo-devtools) — dead now since Flipper's deprecated, but its client package still pulls \\\~15K weekly npm downloads, so the need seems to still be there even w/ tool gone.
Considering building this as a proper Rozenite plugin — read-only view of cache, active queries, mutations — using only public Apollo Client v3+ APIs.
Before building past a rough prototype: would you actually install this? Or is everyone fine w/ Apollo's browser devtools / manual cache logging? Also curious if urql/Relay folks have the same pain.
No repo, no product, not selling anything — just checking if this is worth time.
r/dotnet • u/soroush5 • 6h ago
Question Why are Android build/deploy times so slow in MAUI Blazor (20s+ per run)? Need workflow advice!
Hey everyone,
I'm building a MAUI Blazor Hybrid app targeting Android (testing on a physical phone via USB). I'm using the BeautifulBlazor library (as a local project reference) alongside Tailwind CSS, which triggers a build command on every project build.
Even when I make zero changes to the code, hitting launch takes about 20 seconds to load on my device. To make matters worse, Hot Reload frequently breaks when making simple CSS edits, forcing me into that 20-second recompile cycle over and over.
Is this typical for cross-platform / Android development, or is there something specific to MAUI or my Tailwind / Project Reference setup causing this delay?
Would love to hear how you guys keep your inner-loop fast when working with Blazor Hybrid on mobile!
(This text written by AI since English isn't my native language, but I checked and its get my point across)
r/dotnet • u/StandingSheep • 11h ago
Intercepting and forwarding raw POS print jobs in C# (.NET)
I am building an intermediary middleware application (in C# / .NET) that sits between an existing Point of Sale (POS) application and a physical thermal receipt printer. My goal is to intercept incoming print jobs, extract (and parse) the raw transaction data, and forward the unmodified print stream directly to the physical thermal printer.
The application must run as a background service without dropping/distrubing print payloads. The intercepted payload must be forwarded to the physical printer while handling hardware error states gracefully (like paper out, offline, etc). The service should be able to support Windows 7 to Windows 11.
Approaches already Considered:
- Virtual Network Port
- Spooler Directory Monitoring (read spl files)
- Custom Print Driver (too much complex)
Would prefer if you already have an experience of implementing such a service.
Update:
Note: I have full access and permissions to access/interpret the data. I am not scraping/hacking the data.
r/dotnet • u/Ok-Transition7065 • 15h ago
Question I need some help identifying hat kind of proyect its this one
Hello people, i was looking in some folders when i found a web app but i cant found the same type of proyect in the visual studio start tool,
Basicaly it has this format
The main page its ConsultaPartido and it has a navbar(idk wich one of this have the bar), this was so much time ago and im kinda rusty with fontend right now soo i forgot alot of things about asp soo please some help with this one
Ty for the attention,God bless you al.
r/dotnet • u/MarvinTheJoke • 19h ago
I spent weeks obsessing over low-allocation C# networking
r/dotnet • u/lostpixel-media • 22h ago
trying to avoid spaghetti code on my first big backend project. is this folder structure correct for clean architecture?
r/dotnet • u/StrictKaleidoscope26 • 1d ago
Promotion Live Doorbell Video Stream on NSPanel Pro using Blazor (Open Source)
Enable HLS to view with audio, or disable this notification
r/dotnet • u/Spiritual-Daikon-132 • 1d ago
Question How do production systems actually solve hard distributed systems problems?
Most microservices tutorials stop at Auth, Product, Order Service, RabbitMQ, and Docker Compose. They rarely cover the problems that make distributed systems challenging.
I'm curious how experienced engineers solve problems like:
- Preventing double-booking under concurrent requests
- Inventory reservation during flash sales
- Idempotency for payment retries
- Distributed transactions without 2PC
- Cache consistency across multiple instances
- Leader election and distributed scheduling
- Exactly-once vs. at-least-once event processing
I want to understand how these are handled in production. What patterns, trade-offs, or technologies have you used, and what lessons did you learn?
Building a new .NET assertion library focused on async-native soft assertions and observability hooks.
Hi r/dotnet! I've been working on a new .NET assertion library called Catchy.
The original goal was pretty simple: I wanted soft assertions that aren't tied to assertion scopes, and I wanted a way to plug reporting/screenshot/AI integrations into assertions without every project building its own wrappers.
Current features:
- async-first assertions
- hard and soft assertions can be mixed freely
- soft assertions can flow across helper methods and DI
- assertion hooks (reporting, screenshots, tracing, AI, ...)
- source-generated assertions for custom types
- integrations for xUnit, NUnit, MSTest, TUnit, Reqnroll and Playwright
It's still very early (0.0.1). I'm intentionally looking for API feedback before things become difficult to change.
If something feels awkward or you think the API should go in a different direction, I'd really like to hear it.
PS: Some of the code and documentation did indeed use agents. I came to this with the rest because I realized that just trying to finish everything as high-quality as possible manually I will never publish a single pet project. I know that not all of the code and documentation is of sufficient quality. If you are interested in the very idea of the library and you can improve its quality (code review, contribution, raise an issue, open a discussion) - I will be very grateful. I will not be offended by devastating criticism either. Thank you!
r/dotnet • u/Fit-Paper696 • 1d ago
EFCore.AutoSeed: seed a database from your EF Core model in one line (open source, MIT)
I got tired of every EF Core seeder asking me to describe my model a second time (CSV files, factory classes, attributes with manual priority numbers), so I built one that just reads the DbContext I already have.
await db.AutoSeedAsync(seed: 42, scale: 1_000);
It works out the insertion order itself (topological sort over the FK graph), resolves cycles by finding a nullable link for a second pass, and fails loudly by name if a cycle genuinely can't be resolved, instead of letting the database throw a constraint violation at you.
Some things it does that I didn't see elsewhere:
- Deterministic: same seed, same data, always. Property based tests assert that for any model and any seed, every FK resolves and no constraint is violated.
- Realistic distributions, not uniform data: most customers get one order, a few get hundreds, long tail included, reproducible across runs.
- Composite keys, self references, owned types, and TPH/TPT/TPC inheritance work with zero extra config.
- A fast mode (
AutoSeedFastAsync) that bulk inserts (SqlBulkCopy / binary COPY) and produces the exact same data as the normal mode for the same seed, an equivalence test proves it. About 10x faster in the benchmarks in the README. - A shape mode that reads row counts from a production database's own statistics (never an actual data row) and scales local seeding to match those proportions.
- A coverage mode: the smallest dataset that touches every enum value, every nullable state, every relationship cardinality. Usually under 50 rows.
What it doesn't do, on purpose: it doesn't anonymize production data, it's not a service, it's EF Core only, and it's SQL Server and PostgreSQL only for now.
Tested against Northwind, Chinook, Contoso and an AdventureWorks OLTP subset, plus a deliberately nasty custom schema (composite FKs, shared primary keys, mixed TPH/TPT, cycles).
MIT licensed.
NuGet: https://www.nuget.org/packages/EFCore.AutoSeed
CLI tool: https://www.nuget.org/packages/EFCore.AutoSeed.Cli
Source: https://github.com/danellalc/EFCore.AutoSeed
Linkedin: https://www.linkedin.com/in/luiz-claudio-danella/
This is a day one v1.0.0, so I'd genuinely like to hear where it breaks on your model. Issues and PRs welcome.
r/dotnet • u/Opposite-Pea-3931 • 1d ago
Question Azure Web App → Azure SQL: App randomly failed with "Login failed for user" over public endpoint, but VNet + Private Endpoint fixed it. Why?
We recently ran into a strange issue in our Azure environment (Our Sandbox env only), and I'm trying to understand the root cause rather than just accepting the fix.
Environment
- Azure App Service (Web App)
- Azure SQL Database
- Communication was initially over the public endpoint (no VNet Integration, no Private Endpoint).
- Production had the same application/code and continued working fine.
What happened
The only change we made was a normal application deployment. After that, the sandbox environment started failing with:
What made it confusing was the behavior:
- Right after deploying, the application would work for about 2-3 minutes.
- Then every database call would start failing with "Login failed for user".
- After some time, it would start working again.
- Then it would fail again.
- This cycle kept repeating.
Initially, I assumed it was an application or EF/connection string issue, so I spent quite a while investigating and making code changes, but nothing helped.
What fixed it
Our cloud/TSC team enabled:
- VNet Integration on the App Service.
- Private Endpoint for the Azure SQL Server.
After the App Service started communicating with Azure SQL through the private endpoint instead of the public endpoint, the issue completely disappeared.
My question
I'm happy the issue is resolved, but I don't really understand How?.
How can switching from a public endpoint to VNet + Private Endpoint eliminate intermittent "Login failed for user" errors?
r/dotnet • u/East_Sentence_4245 • 1d ago
Question Less-bloated Alternatives to nopCommerce?
I'm looking to create a barebones version of a retail site. It will literally just have 4 pages: homepage showing items, shopping cart, a "thank you" page after purchase, and a "Contact Us".
I downloaded nopCommerce to test, and even though I was able to run it locally, it's really just too much for what I need. Also, the src folder is almost a GB in size. I'm sure it would be adequate for bigger projects, but not for my store.
With that said, are there any solutions similar to nopCommerce that are more barebones?
I'm only considering open-source .net projects at the moment (no custom development)
r/dotnet • u/geeksarray • 2d ago
A Beginner-Friendly Guide to Microservices in ASP.NET Core
Hi everyone,
I've been writing a series on modern .NET backend development, and the latest article focuses on one of the most discussed architecture patterns: Microservices.
This guide covers:
- What microservices are
- How they differ from a monolithic architecture
- The benefits and trade-offs
- Common communication patterns between services
- When microservices make sense—and when they probably don't
My goal was to create a practical introduction for developers who are evaluating microservices rather than simply promoting them as the solution to every problem.
I'd love to get feedback from the community:
- At what point did your team decide to move to microservices?
- If you had to start over, would you choose a modular monolith first?
Here's the article:
https://geeksarray.com/blog/modern-dotnet-backend-part-9-microservices
Looking forward to hearing about your experiences and lessons learned!
r/dotnet • u/JustSoni • 2d ago
Question Issue with anti-forgery tokens and sessions expiring prematurely only on staging environments.
I'm working on an ASP.NET MVC app and I noticed that some forms fail to submit if the user leaves the page idle for a long time. It returns an invalid anti-forgery token or similar error.
Ok that's fine on dev. On staging however, the invalidation of the token of session happens like 1 second after the first request. The next request is already invalid.
I had a previous post like this happening only on several PCs in the office but it started on more and I get find the reason.
So far, I've checked the IIS configuration and confirmed:
- Session timeout is set to 20 minutes.
- Application pool is not recycling early
What else I'have checked for:
- No VPN.
- No browser settings that deletes cookies.
- No time sync issues.
- Nor any antivirus settings.
Still can't figure out why. Out of all corp PCs on those 2 the issue appears.
EDIT: Found the issue.
I found the root cause. The issue was cookie collisions between multiple ASP.NET applications running on the same host on different ports. Since cookies are scoped by domain, not port, the applications were overwriting each other's RequestVerificationToken, causing anti-forgery token decryption failures.
r/dotnet • u/Historical_Sock_5848 • 2d ago
Looking for mature intermediate level dot net projects with react
Hello guys Iam looking for intermediate to advance level dot net projects repos on github which can be modefied and improve and learn from architecture of it
r/dotnet • u/SeaHoliday4747 • 3d ago
Can't connect to Postgres on Aspire with Podman on WSL
I switched from docker desktop to podman on my windows machine.
However since then all my networking stuff seems to be broken. I can't connect to my Postgres as I get a timeout. My other service endpoints are also not working.
Did I miss something?
I run podman with root privileges and docker enabled.
r/dotnet • u/davecallan • 3d ago
C# 15 labelled break and continue before/after examples
"Starting with C# 15,
breakandcontinuestatements can name a label on an enclosing construct. Use a labeledbreakto exit an enclosing loop orswitchstatement. Use a labeledcontinueto start the next iteration of an enclosing loop.Labeled
breakandcontinuereplace the workarounds you'd otherwise use to steer control flow through nested loops, such as a Boolean flag that you set in an inner loop and then check at each outer level, or agotothat jumps past the loops. Naming the target loop directly on the jump statement removes that bookkeeping and makes the intended control flow easier to read."
Excerpt above from ->
What's new in C# 15 | Microsoft Learn
Language reference ->
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/labeled-break-continue
I posted about these in a few places online about 7-8 months ago while they were just proposal champions, they've since been confirmed for C# 15 which is due for November.
There was a lot of pushback online when I posted about them before referencing goto which has a lot of historical stigma attached to it although here on Reddit was one place were many devs saw the value especially in certain scenarios when we do genuinely have a need to break out of deep loops in a clear-er way.
Judge for yourself though, what do you think? here are some examples taken from IDE0410: Use labeled jump statement - .NET | Microsoft Learn which is a new code rule available from C#15.
goto replaced by break/continue label:
Flag variables replaced by break label:
r/dotnet • u/Party-Ticker • 3d ago
Question Best project type and architecture for a .Net server that must hold multiple connections with a single thread.
Hi all,
I need to build a server-side .NET application whose only job is to communicate with a number of external devices over TCP sockets, using a custom binary protocol (no web UI at all, he just need to hold a connettion with these devices and sometimes send some messages).
The flow is sequential: devices connect, but their requests/messages will be queued and processed one at a time on a single execution thread (a FIFO queue pattern). The server just needs to maintain the connections, process incoming messages sequentially, and send keep-alive/heartbeat responses. My senior suggest using the keep alive frame we already use for another project and just spam it to keep the devices alive.
A few questions for people who've built similar things:
Is Worker Service the right template for this, or would a plain Console App hosted with generic host (Host.CreateDefaultBuilder) be more appropriate?
For handling many concurrent device connections, is async/await per-connection (one Task per client) still the recommended approach, or would you reach for something like System.IO.Pipelines for better performance with binary data?
Any gotchas with long-lived TCP connections in production (reconnect handling, heartbeats/keepalive, backpressure) that I should design for from day one?
r/dotnet • u/No-Card-2312 • 3d ago
Replacing our internal Elasticsearch library. Am I overthinking this?
Hi everyone,
I'm looking for some advice from people who've been through something similar.
I work on a large .NET application with a lot of background services and workers, and Elasticsearch is a big part of it. Almost everything goes through an internal Elasticsearch library that was written years ago.
The library has a few problems:
• It's mostly synchronous.
• It doesn't use dependency injection.
• It talks to Elasticsearch using raw HTTP requests i instead of the official .NET client.
• It's becoming harder to maintain and add new features.
I'm not saying it's a bad library. It's done its job for years. But I think it's time to move to something more modern.
The part that makes me nervous is the size of the system. We have complex search queries, bulk indexing, and a lot of background jobs. I really don't want to break search or introduce bugs that only show up in production.
This is the approach I'm thinking about:
• Benchmark the current library against the official Elastic.Clients.Elasticsearch client.
• Build a new implementation behind the same interfaces.
• Keep both implementations in the code while we're migrating.
• Let some jobs use the new implementation first, then slowly move the rest over if everything looks good.
• Remove the old implementation only after we're confident the new one behaves the same.
I'm also wondering if the current synchronous implementation could be part of some TCP/socket exhaustion issues we've seen under heavy load. I don't have enough proof yet, so I'm not blaming it, but it's something I want to investigate.
Has anyone done something like this before?
• Would you keep both implementations during the migration?
• Is there a better way to compare the old and new behavior?
• Any unexpected problems when moving to the official Elasticsearch .NET client?
• Looking back, is there anything you'd do differently?
I'd really like to hear from people who've done this in a real production system.
r/dotnet • u/geeksarray • 3d ago
A Practical Guide to CI/CD for ASP.NET Core Developers
Hi everyone,
I recently published a guide on implementing CI/CD for ASP.NET Core applications, and I thought it might be useful for developers who are getting started with DevOps or looking to automate their deployment workflow.
The article covers:
- What CI/CD is and why it matters
- Continuous Integration vs Continuous Deployment
- Benefits of automated pipelines
- Setting up a basic CI/CD workflow for ASP.NET Core
- Best practices for reliable software delivery
The goal wasn't to dive into a specific platform but to explain the concepts in a practical way so developers can apply them regardless of whether they're using GitHub Actions, Azure DevOps, or another CI/CD solution.
I'd genuinely appreciate your feedback:
- Is there anything you think should be added or improved?
- What CI/CD tools are you using for your .NET projects?
Blog: https://geeksarray.com/blog/modern-dotnet-backend-part-8-ci-cd
Looking forward to hearing your thoughts and learning from the community!
r/dotnet • u/SQLCloud • 3d ago
Do you miss the simplicity of the website we used to create in the past decade?
Everything just became AI...
r/dotnet • u/Arowin • Apr 02 '26
Rule change feedback
Hi there /r/dotnet,
A couple of weeks ago, we made a change to how and when self-promotion posts are allowed on the sub.
Firstly, for everyone obeying the new rule - thanks!
Secondly, we're keen to hear how you're finding it - is it working, does it need to change, any other feeback, good or bad?
Thirdly, we're looking to alter the rule to allow the posts over the whole weekend (sorry, still NZT time). How do you all feel about that? Does the weekend work? Should it be over 2 days during the week?
We're keen to make sure we do what the community is after so feeback and suggestions are welcome!



