.NET
75 posts tagged with this.
-
Separate Liveness From Database Readiness
Load balancer probes that open SQL on every hit will starve the pool under recycle storms. Split liveness from readiness before the next deploy.
-
HostOptions.ShutdownTimeout Is Only Five Seconds
ASP.NET Core gives hosted services five seconds to stop unless you raise HostOptions.ShutdownTimeout. On IIS app pool recycles that default truncates queue drains and leaves half-finished SQL work.
-
Keep Host Config Intact When Publishing .NET 10
Blind Web Deploy overwrites connection strings and rewrite rules on shared IIS. Separate code from host config with skip rules, layered appsettings, and a short post-publish check.
-
Kestrel Body Limits Still Hit IIS 404.13
Raising MaxRequestBodySize is not enough behind IIS. Align requestFiltering or large POSTs still die as 404.13 before Kestrel runs.
-
Web Deploy Parameters and Post-Publish Smoke Tests
Most IIS outages after a .NET ship are bad config, not bad code. Parameterize Web Deploy, keep secrets off disk, and gate traffic on a short smoke script.
-
Put Forwarded Headers First in the ASP.NET Pipeline
IIS already terminated TLS, yet apps still log http and 127.0.0.1. Run UseForwardedHeaders before HTTPS redirects and auth or scheme and client IP stay wrong.
-
SqlClient Encrypt Defaults Break Quietly After NuGet Bumps
A Microsoft.Data.SqlClient bump can flip Encrypt on and drop SQL connections from IIS overnight. Here is the failure mode we see and how to set Encrypt on purpose.
-
Ship .NET 10 With Staging Slots, Not Blind Overwrites
Stop overwriting production first. Use a publish-once pipeline, environment slots, and post-deploy smoke checks that fit shared IIS and Windows VPS reality.
-
Stop Regenerating Data Protection Keys on Every Recycle
App pool recycles that wipe in-memory Data Protection keys log everyone out. Persist the key ring outside the publish folder so cookies and antiforgery survive IIS restarts.
-
Folder Swap Cutover for .NET 10 on IIS
Shared and VPS IIS hosts rarely offer Azure-style slots. Publish to a sibling folder, smoke-test it, then flip the site physical path for a clean cutover.
-
Output Cache for ASP.NET Core 10 APIs on IIS
Cut repeat SQL and CPU on IIS-hosted APIs with ASP.NET Core output cache. Wire policies, vary-by rules, and tag eviction so responses stay fast and correct after recycles.
-
PathBase for ASP.NET Core Under IIS Virtual Apps
ASP.NET Core under an IIS virtual app misbuilds links and cookies unless PathBase is set. Wire middleware and web.config so /api and sub-apps stay correct.
-
IIS App Pool Recycling Without Dropping ASP.NET Requests
Default IIS recycles hit at awkward hours and can cut in-flight work. Schedule quiet-hour recycles, enable overlap, and set shutdown limits so ASP.NET finishes cleanly.
-
GitHub Actions Web Deploy for .NET 10 on IIS
Wire publish and Web Deploy into GitHub Actions so ASP.NET Core 10 hits IIS the same way every push. Covers profiles, safe excludes, and a post-deploy smoke check.
-
Tune .NET GC for ASP.NET Core App Pools on IIS
Default GC settings can thrash IIS app pools under load. Align heap limits with recycle thresholds so ASP.NET Core 10 stays stable on Windows hosts.