Tag

C#

10 posts tagged with this.

  1. Official Blog
    · 2 min read

    GetCurrentDirectory Lies After an IIS Deploy

    Under IIS, Directory.GetCurrentDirectory often points at inetsrv, not your published folder. Use ContentRootPath for relative file loads.

  2. Official Blog
    · 2 min read

    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.

  3. Official Blog
    · 2 min read

    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.

  4. Official Blog
    · 4 min read

    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.

  5. Official Blog
    · 4 min read

    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.

  6. Official Blog
    · 3 min read

    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.

  7. Official Blog
    · 4 min read

    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.

  8. Official Blog
    · 4 min read

    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.

  9. Official Blog
    · 4 min read

    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.

  10. Knowledge BaseWindows Cloud Hosting
    · 2 min read

    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.