C#
10 posts tagged with this.
-
GetCurrentDirectory Lies After an IIS Deploy
Under IIS, Directory.GetCurrentDirectory often points at inetsrv, not your published folder. Use ContentRootPath for relative file loads.
-
HostOptions.ShutdownTimeout Won't Save Long Jobs on IIS
ShutdownTimeout defaults to 30 seconds and ANCM may stop waiting sooner. Size both under the IIS pool limit so recycles don't truncate background work.
-
SqlClient Encrypt Defaults Break Quietly After NuGet Bumps
A Microsoft.Data.SqlClient bump can flip Encrypt on and drop SQL connections from IIS overnight. The failure mode, and how to set Encrypt on purpose.
-
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.
-
HttpClient DNS Refresh for IIS-Hosted .NET Apps
Long-lived IIS worker processes keep outbound sockets past DNS TTLs. Set connection lifetimes so .NET 10 apps pick up endpoint changes without a recycle.
-
Set .NET Roll-Forward Safely for IIS Hosted Apps
Framework-dependent .NET apps on IIS inherit the host’s shared runtimes. Set rollForward explicitly so patch updates apply without surprise major jumps.
-
Persist Data Protection Keys for ASP.NET Core on IIS
App pool recycles reset in-memory Data Protection keys and break cookies. Persist the key ring outside the site folder so auth survives restarts.
-
ASP.NET Core 10 on IIS: In-Process Hosting Checklist
Ship ASP.NET Core 10 on IIS without 502.5 surprises. App pool, ANCM, Web.config, and SQL connection settings that actually matter on Windows hosts.
-
ASP.NET Core 10: IIS Application Initialization
App pool recycles still cold-start ASP.NET Core on IIS. Use Application Initialization plus a warmup path so .NET 10 apps stay responsive after recycle.
-
How to Connect to MySQL with PHP, Perl, C#, VB.NET or Classic ASP
Learn to connect to your MySQL database using code samples for PHP (mysql, mysqli procedural, OO, PDO), Perl with DBI, C# and VB.NET with MySQL Connector, and Classic ASP with MyODBC. Basic examples expanded with context, prerequisites, and best practices for robust implementation.