How to Deploy ASP.NET Core 8 Apps on IIS 10 and Plesk Panel
ASP.NET Core 8.0 is Microsoft's flagship framework for high-performance web development. Learn how to deploy your C# web application step-by-step on Windows Server infrastructure with IIS 10 and Plesk Obsidian, including web.config setup and troubleshooting 500.19, 502.5, and 403.14 error codes.
⚡ Prerequisites & Server Setup
- Local Dev Environment: Visual Studio 2022 (v17.8+) or .NET 8.0 SDK installed.
- ASP.NET Core Hosting Bundle: Requires
AspNetCoreModuleV2registered in IIS 10. Pre-installed on all Skyversal Windows Hosting servers. If managing your own server, download from the Microsoft Official Hosting Bundle Download Page and restart IIS withiisreset. - Plesk Panel Credentials: Windows Plesk Hosting account login details.
Step 1 — Choose Deployment Type (Publish)
You can deploy ASP.NET Core applications using two deployment models:
- Framework-Dependent (Recommended): Uses server-installed .NET 8 runtime. Small package size (~15 MB).
- Self-Contained: Bundles the .NET runtime into the publish output. Eliminates server runtime dependencies.
# 1. Framework-Dependent Publish:
dotnet publish -c Release -o ./publish
# 2. Self-Contained Publish (x64 Standalone - Generates .exe):
dotnet publish -c Release -r win-x64 --self-contained true -o ./publish
Step 2 — Configure web.config
In .NET 6, 7, and 8, wrap your configuration inside <location path="." inheritInChildApplications="false"> to prevent settings leaking into child applications in shared hosting environments like Plesk:
⚠️ processPath Configuration based on Deployment Model:
Framework-Dependent: processPath="dotnet" and arguments=".\YourApp.dll"
Self-Contained: processPath=".\YourApp.exe" and arguments=""
<!-- 1. Framework-Dependent web.config Example -->
<?xml version="1.0" encoding="utf-8"?>
<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=".\logs\stdout" hostingModel="inprocess" />
</system.webServer>
</location>
<!-- 2. Self-Contained web.config Example (Executes .exe directly) -->
<?xml version="1.0" encoding="utf-8"?>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath=".\YourApp.exe" arguments="" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
</system.webServer>
</location>
Step 3 — Upload via Plesk & Folder Permissions
- Log into Plesk Obsidian and click Files.
- Clear default files in
httpdocs. - Zip your local
publishdirectory, upload it tohttpdocs, and click Extract. - Create a folder named
logsinsidehttpdocs. - Verify IIS_IUSRS write permissions on the
logsfolder via Plesk File Permissions.
Figure 1: Deploying ASP.NET Core files to httpdocs in Plesk Obsidian File Manager
Step 4 — App Pool Setup & Recycle
- Open Plesk > Dedicated IIS Application Pool Settings.
- Set .NET CLR Version to
No Managed Code. - Ensure Enable 32-Bit Applications is set to
False. - Click Recycle Pool to clear cached assemblies.
🛠️ Troubleshooting & Error Codes
🔴 HTTP Error 500.19 — Internal Server Error
Cause: web.config XML syntax error or missing AspNetCoreModuleV2 on server.
Fix: Confirm Hosting Bundle is installed, run iisreset if managing your own VPS, and check web.config XML syntax.
🟡 HTTP Error 502.5 — Process Failure
Cause: Application crash during startup in Program.cs or invalid DLL path.
Fix: Set stdoutLogEnabled="true" in web.config and inspect C# exceptions in httpdocs/logs/stdout_*.log.
🔵 HTTP Error 403.14 — Directory Browsing Not Configured
Cause: IIS failing to pass the request to AspNetCoreModuleV2, falling back to StaticFileModule without a default index document, where Directory Browsing is disabled.
Fix: Confirm web.config resides directly in httpdocs root, App Pool is set to No Managed Code, and AspNetCoreModuleV2 is registered.