Deploying .NET 9 Applications via Plesk Print

  • 0

Overview

This guide explains how to deploy your .NET 9 (ASP.NET Core 9) application to your Windows hosting account using Plesk. .NET 9 is fully supported on our Windows Server 2022 and 2019 hosting plans.

Deployment Options

1. Framework-Dependent Deployment (FDD) - Recommended

Uses the .NET 9 runtime installed on our servers. Smaller deployment size.

dotnet publish -c Release -o ./publish

2. Self-Contained Deployment (SCD)

Includes the .NET runtime with your application. Larger but independent.

dotnet publish -c Release -r win-x64 --self-contained true -o ./publish

Step 1: Publish Your Application

Using Visual Studio 2022:

  1. Right-click your project → Publish
  2. Select Folder as target
  3. Click Show all settings
  4. Configuration: Release
  5. Target Framework: net9.0
  6. Deployment Mode: Framework-dependent (recommended)
  7. Target Runtime: win-x64
  8. Click Publish

Using Command Line:

# Framework-dependent (smaller, uses server runtime)
dotnet publish -c Release -o ./publish

# Self-contained (larger, includes runtime)
dotnet publish -c Release -r win-x64 --self-contained true -o ./publish

Step 2: Upload Files to Plesk

Option A: Plesk File Manager

  1. Log in to Plesk
  2. Go to Websites & Domains
  3. Click File Manager
  4. Navigate to httpdocs
  5. Upload all files from your publish folder

Option B: FTP Upload

  1. Connect using FTP credentials from Plesk
  2. Navigate to /httpdocs
  3. Upload all published files

Step 3: Configure .NET Core in Plesk

  1. Go to Websites & Domains
  2. Select your domain
  3. Click .NET Core (or ASP.NET Core)
  4. Configure:
    • Application Root: /httpdocs (or your app folder)
    • Document Root: /httpdocs
    • Application Startup File: YourApp.dll
  5. Click Enable

Step 4: Set Environment Variables

In Plesk .NET Core settings, add:

ASPNETCORE_ENVIRONMENT=Production

Step 5: Verify Deployment

  1. Visit your domain in a browser
  2. Check for any errors
  3. Test application functionality

Updating Your Application

  1. Publish new version locally
  2. Upload updated files to Plesk
  3. Go to .NET Core settings
  4. Click Restart

Was this answer helpful?

« Back