Overview
This guide explains how to deploy a .NET 11 (ASP.NET Core 11) application to your Windows hosting account using Plesk. On our servers, .NET 11 apps are published as self-contained: the .NET 11 runtime is included in your publish folder, so your app runs without anything being installed on the server.
Before You Begin
Make sure your application is:
- Targeting
net11.0in your.csproj - Built and tested locally with the .NET 11 SDK
- Published as self-contained for
win-x64(steps below)
Step 1: Publish Your Application as Self-Contained
Option A: Command Line
dotnet publish -c Release -r win-x64 --self-contained true -o ./publish
This creates a publish folder with your app, the .NET 11 runtime, and a web.config for IIS.
Option B: Visual Studio
- Right-click your project and choose Publish
- Choose your target (Folder, FTP or Web Deploy)
- Click Show all settings
- Set Deployment mode to Self-contained
- Set Target runtime to win-x64
- Save the profile and click Publish
Option C: Set It in the Project File
If you want every publish to be self-contained, add these lines to your .csproj:
<PropertyGroup>
<TargetFramework>net11.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
</PropertyGroup>
Step 2: Check the web.config
A self-contained publish writes a web.config that starts your app's own .exe instead of dotnet. It looks like this (with your app's name):
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\MyApp.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
</system.webServer>
</location>
</configuration>
Keep this file as your publish produced it. If processPath says dotnet and arguments names a .dll, the app was published framework-dependent and will not start for .NET 11 yet. Publish again as self-contained.
Step 3: Upload Your Files
If the site is already running, upload a file named app_offline.htm to the site root first. IIS then stops the app so its files are not locked while you copy. Delete app_offline.htm when the upload is finished.
Option A: Plesk File Manager
- Log in to Plesk
- Go to Websites & Domains
- Click File Manager for your domain
- Open your web root (usually
httpdocs) - Upload everything from your
publishfolder (you can upload a ZIP and extract it in File Manager)
Option B: FTP
- Connect with your FTP credentials from Plesk
- Open
/httpdocsor your document root - Upload everything from your local
publishfolder
Option C: Web Deploy from Visual Studio
Use the Web Deploy publish profile for your site, with Deployment mode set to Self-contained and Target runtime set to win-x64 as in Step 1. See the Deployment & Publishing section of the knowledge base for setting up the profile.
Step 4: Restart the Application
No runtime setting is needed in Plesk for a self-contained app; you do not need to change anything on the domain's .NET Core page. To make sure the new version is loaded, recycle the application pool:
- Go to Websites & Domains
- Open your domain
- Click Dedicated IIS Application Pool
- Click Recycle
Step 5: Verify Your Application
- Visit your domain in a web browser
- Check that the application loads and the key pages work
- If you see an HTTP 500.3x error, see Troubleshooting .NET 11 Application Errors
Important Notes
- A self-contained publish is larger than a framework-dependent one because it includes the runtime, so it uses more of your plan's disk space.
- Microsoft releases .NET 11 patch updates (11.0.x). A self-contained app keeps the runtime it was published with, so republish with the latest SDK to pick up security fixes.
- The environment is
Productionby default. Put production settings inappsettings.Production.json. - Once the shared .NET 11 runtime is added to our servers, framework-dependent publishing will work too. Your self-contained app keeps working either way.
Official documentation: What's new in .NET 11