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:
- Right-click your project → Publish
- Select Folder as target
- Click Show all settings
- Configuration: Release
- Target Framework: net9.0
- Deployment Mode: Framework-dependent (recommended)
- Target Runtime: win-x64
- 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
- Log in to Plesk
- Go to Websites & Domains
- Click File Manager
- Navigate to httpdocs
- Upload all files from your
publishfolder
Option B: FTP Upload
- Connect using FTP credentials from Plesk
- Navigate to
/httpdocs - Upload all published files
Step 3: Configure .NET Core in Plesk
- Go to Websites & Domains
- Select your domain
- Click .NET Core (or ASP.NET Core)
- Configure:
- Application Root: /httpdocs (or your app folder)
- Document Root: /httpdocs
- Application Startup File: YourApp.dll
- Click Enable
Step 4: Set Environment Variables
In Plesk .NET Core settings, add:
ASPNETCORE_ENVIRONMENT=Production
Step 5: Verify Deployment
- Visit your domain in a browser
- Check for any errors
- Test application functionality
Updating Your Application
- Publish new version locally
- Upload updated files to Plesk
- Go to .NET Core settings
- Click Restart