Tuesday, November 3, 2026

How to Deploy an ASP.NET Core App on Plesk Windows Hosting



To deploy an ASP.NET Core app on Plesk, follow these steps:

  1. Confirm the server has the right ASP.NET Core runtime and hosting module.
  2. Publish your project with dotnet publish.
  3. Upload the publish folder to the site's document root.
  4. Make sure the generated web.config sits next to your app's .dll.
  5. Add your connection string and environment.

Most failures after that are HTTP 500.30, 500.31 or 502.5. Each has a known cause, and the stdout log will usually tell you which one you've hit. Here's the full process, plus one date you should know about: .NET 8 and .NET 9 reach end of support on November 10, 2026.

Before you start: which .NET version should you target?

Target .NET 10 for anything new or anything you're still maintaining. Microsoft ends support for both .NET 8 (LTS) and .NET 9 (STS) on November 10, 2026. After that they get no security patches (.NET Blog). .NET 10 is a long-term-support release, supported until November 14, 2028 (.NET support policy).

On Plesk for Windows, support for each version arrived with a minimum Plesk release, using the "Microsoft ASP.NET Core hosting features" component in the Plesk Installer (Plesk support article 12377600431511):

ASP.NET CoreMinimum Plesk Obsidian versionSupport ends
8.018.0.57Nov 10, 2026
9.018.0.66Nov 10, 2026
10.018.0.75Nov 14, 2028

Other versions can be installed manually on a server you control. To see which runtimes a server has, run dotnet --info (VPS or dedicated) or ask your host (shared hosting).

Step 1: Check the server has the runtime and hosting module

IIS runs ASP.NET Core through the ASP.NET Core Module (ANCM). The module is installed with the .NET Hosting Bundle (Microsoft Learn: ASP.NET Core Module).

  • Shared Windows hosting: you can't install runtimes yourself. Ask the host which ASP.NET Core versions are installed. 4GoodHosting's Windows web hosting plans run Plesk on IIS.
  • Windows VPS: you have full admin rights. Install the Hosting Bundle for your version, or add the component through the Plesk Installer. On 4GoodHosting's Windows VPS plans, Plesk is an optional add-on ($15 CAD/mo, up to 100 domains).

If you install the Hosting Bundle after IIS, restart IIS (net stop was /y then net start w3svc) so the module loads.

Step 2: Choose framework-dependent or self-contained

Self-contained publishing is the standard fix when the host doesn't have your runtime. It doesn't remove the need for the ASP.NET Core Module in IIS (Microsoft Learn: .NET app publishing overview).

# Framework-dependent
dotnet publish -c Release -o ./publish

# Self-contained for 64-bit Windows
dotnet publish -c Release -r win-x64 --self-contained true -o ./publish
Framework-dependentSelf-contained
What you uploadYour app onlyYour app plus the .NET runtime
SizeSmall (MBs)Large (often 70 MB+)
Needs the runtime on the server?Yes, matching major versionNo
Needs ANCM / Hosting Bundle?YesYes, IIS still needs the module
Best forHosts that already have your versionShared hosting without your runtime, or pinning an exact version

Don't publish as a single file (PublishSingleFile) if you're using in-process hosting. That combination produces HTTP 500.38.

Step 3: Upload to the document root

Plesk supports two upload methods for ASP.NET Core: FTP (or Plesk File Manager), and publishing from Visual Studio (Plesk support).

  1. In Plesk, open the domain and note its document root. This is usually httpdocs.
  2. Upload the contents of your publish folder, not the folder itself, into that document root.
  3. Check that web.config and YourApp.dll sit side by side in the root.

If you upload the folder by mistake, or web.config is missing, IIS returns 403.14 Forbidden because it's looking for a default document (Microsoft Learn troubleshooting).

What the web.config should look like

dotnet publish generates this file for you. A typical in-process version:

<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".YourApp.dll"
                  stdoutLogEnabled="false" stdoutLogFile=".logsstdout"
                  hostingModel="inprocess">
        <environmentVariables>
          <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" />
        </environmentVariables>
      </aspNetCore>
    </system.webServer>
  </location>
</configuration>

For a self-contained publish, processPath is .YourApp.exe and there are no arguments.

Application pool: ASP.NET Core doesn't use the classic .NET CLR. If your Plesk plan allows a dedicated IIS application pool, set it to No Managed Code.

Step 4: Connect to Microsoft SQL Server

  1. In Plesk, go to Databases → Add Database, choose the Microsoft SQL Server type, and create a database user.
  2. Put the connection string in appsettings.Production.json, or in an environment variable, rather than hard-coding it:
{
  "ConnectionStrings": {
    "Default": "Server=YOUR_SQL_HOST;Database=yourdb;User Id=youruser;Password=__SET_ON_SERVER__;Encrypt=True;TrustServerCertificate=False"
  }
}

Watch the encryption default. Since Microsoft.Data.SqlClient 4.0, Encrypt defaults to true (SqlClient 4.0 release notes). If your app suddenly fails with a "certificate chain was issued by an authority that is not trusted" error, that usually means the SQL Server certificate isn't trusted by the client. The right fix is a trusted certificate on the SQL Server. Setting TrustServerCertificate=True turns off certificate validation, so treat it as a short-term workaround on a private network only.

ASP.NET Core picks appsettings.Production.json when ASPNETCORE_ENVIRONMENT is Production (Microsoft Learn: environments).

Step 5: Deploy updates without file-in-use errors

When the app is running, IIS locks the .dll, so overwriting it over FTP fails. The fix is built into the ASP.NET Core Module:

  1. Upload a file named app_offline.htm to the document root. The module shuts the app down gracefully and serves that page to visitors.
  2. Upload the new build.
  3. Delete app_offline.htm. The next request starts the new version.

The file must be under 4 GB, and it works most reliably with in-process hosting (Microsoft Learn: app_offline.htm).

Fixing HTTP 500.30, 500.31, 502.5 and other ASP.NET Core errors

Start with the error code. This table summarizes Microsoft's troubleshooting guide (Microsoft Learn):

ErrorWhat it meansUsual fix
500.30 In-process start failureThe app crashed during startupRead the stdout log: often a bad connection string, missing config or an exception in Program.cs
500.31 Failed to find native dependenciesThe required .NET runtime isn't installedInstall the runtime, retarget to an installed version, or publish self-contained
500.32 Failed to load .dllBitness mismatch (32- vs 64-bit)Match the app's platform to the app pool's "Enable 32-bit applications" setting
500.38Single-file publish with in-process hostingPublish without PublishSingleFile
502.5 Process failureOut-of-process app failed to startSame causes as 500.30; check the log
403.14 ForbiddenNo web.config / wrong folderUpload the publish contents to the document root

Turn on the stdout log, briefly

  1. In web.config, set stdoutLogEnabled="true" and keep stdoutLogFile=".logsstdout".
  2. Create a logs folder in the document root and make sure the app pool identity can write to it.
  3. Reload the site, then read the newest file in logs.
  4. Set it back to false. The stdout log has no size limit, so it will keep growing and fill your disk.

On a VPS you can also open a command prompt in the site folder and run dotnet .\YourApp.dll. The startup exception prints straight to the console. If NuGet caches are behaving strangely during builds, dotnet nuget locals all --clear resets them.

Shared Windows hosting or a Windows VPS?

You need…Shared Windows hosting (Plesk)Windows VPS
A small site or API on a runtime the host already has✅ Lowest cost (Business-W from $8.95 CAD/mo on a 36-month term)Overkill
A runtime version the host doesn't offerPublish self-contained (ANCM still required)✅ Install anything
Background services, Windows services, custom IIS settings❌ Usually not allowed✅ Full admin
Your own SQL Server editionLimited to what's offered✅ Add MSSQL licence
Predictable resourcesShared✅ Dedicated vCPU/RAM

For a broader decision guide, see why you might host your website on a Windows server, or compare Linux VPS vs Windows VPS.

Deployment checklist

  • App targets .NET 10 (or you have a plan before Nov 10, 2026)
  • Server has the matching runtime, or you published self-contained
  • ASP.NET Core Module / Hosting Bundle installed on IIS
  • Publish contents (not the folder) uploaded to the document root
  • web.config next to the .dll
  • App pool: No Managed Code; bitness matches
  • Connection string outside source control; Encrypt behaviour understood
  • ASPNETCORE_ENVIRONMENT set
  • stdout logging turned off after troubleshooting
  • app_offline.htm used for updates

Frequently asked questions

Does Plesk support ASP.NET Core 10?

Yes. Plesk Obsidian 18.0.75 and later support ASP.NET Core 10.0 on Windows through the "Microsoft ASP.NET Core hosting features" component. Ask your host which version their servers run.

What causes HTTP Error 500.30 on IIS?

500.30 means the app failed while starting in-process. Turn on the stdout log in web.config to see the exception. It's usually a configuration error, a missing setting or a database connection failure.

How do I fix HTTP Error 500.31?

The server doesn't have the .NET runtime your app targets. Install that runtime, retarget your app to a version the server has, or publish the app as self-contained.

Should I publish framework-dependent or self-contained?

Use framework-dependent when the host already has your .NET version, because uploads are smaller. Use self-contained when it doesn't. Either way, IIS still needs the ASP.NET Core Module.

Can I run ASP.NET Core on shared Windows hosting?

Yes, if the host has your runtime and the ASP.NET Core Module installed. Choose a Windows VPS if you need custom runtimes, background services or full control of IIS.

Is .NET 8 still supported?

Only until November 10, 2026. After that date .NET 8 and .NET 9 receive no security updates. Move to .NET 10, which is supported until November 14, 2028.

Labels: ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home