StarDomain

How to Deploy an ASP.NET Application in Plesk

How to Deploy an ASP.NET Application in Plesk

Plesk on Windows hosting supports both ASP.NET Framework and .NET Core/.NET 6+ applications. This guide covers deploying your application through the Plesk control panel.

Prerequisites

  • A Windows hosting plan with Plesk
  • Your compiled application files
  • A configured MSSQL or MySQL database (if your app requires one)

Deploying ASP.NET Framework Applications

Step 1: Upload Your Files

  1. Log in to Plesk
  2. Go to Websites & Domains > select your domain
  3. Click File Manager
  4. Navigate to the httpdocs folder
  5. Upload your application files (.aspx, .dll, web.config, bin/ folder, etc.)

Step 2: Configure the Application

  1. Go to Websites & Domains > your domain
  2. Click Hosting & DNS > Hosting Settings
  3. Under Web Scripting and Statistics:

- Enable ASP.NET support

- Select the correct .NET Framework version (4.x recommended)

  1. Click OK

Step 3: Set the Application Pool

  1. Go to ASP.NET Settings or Hosting Settings
  2. Configure the application pool:

- .NET CLR version — Match your application (v4.0 for .NET 4.x)

- Pipeline mode — Integrated (recommended) or Classic

  1. Click OK

Step 4: Configure Connection Strings

Update your web.config with the correct database connection:

xml
<connectionStrings>
  <add name="DefaultConnection" 
       connectionString="Server=localhost;Database=YourDB;User Id=YourUser;Password=YourPass" 
       providerName="System.Data.SqlClient" />
</connectionStrings>

Step 5: Test

Visit https://yourdomain.com to verify your application loads correctly.

Deploying .NET Core / .NET 6+ Applications

Step 1: Publish Your Application

On your development machine, publish as self-contained or framework-dependent:

bash
dotnet publish -c Release -o ./publish

Step 2: Upload Published Files

  1. Upload the contents of the publish folder to httpdocs in Plesk
  2. Ensure the web.config file generated by dotnet publish is included

Step 3: Configure in Plesk

  1. Go to Websites & Domains > your domain
  2. Ensure ASP.NET support is enabled
  3. The web.config from dotnet publish configures IIS to proxy requests to the Kestrel server

Step 4: Set Environment Variables

  1. Go to ASP.NET Settings
  2. Under Application Settings, add:

- ASPNETCORE_ENVIRONMENT = Production

- Any other environment-specific variables

  1. Click OK

Common Deployment Steps

Setting Up a Virtual Directory

If your app runs in a subdirectory:

  1. Go to Websites & Domains
  2. Click Virtual Directories
  3. Create a new virtual directory
  4. Point it to your application folder
  5. Mark it as an application

Updating Your Application

  1. Upload new files to overwrite existing ones
  2. Recycle the application pool (Websites & Domains > App Pool > Recycle)
  3. Clear browser cache and test

Troubleshooting

500 Internal Server Error

  • Check the Application Event Log in Plesk
  • Enable detailed errors in web.config:
xml
<system.webServer>
  <httpErrors errorMode="Detailed" />
</system.webServer>
  • Verify the correct .NET version is selected

Application Does Not Start

  • Check if the application pool has stopped — restart it
  • Verify all required DLLs are in the bin folder
  • Check the Event Viewer for detailed error messages

Connection String Issues

  • Verify database credentials
  • Check the database exists and the user has access
  • Test the connection string separately

Need help? Contact our support team at {{SUPPORT_EMAIL}} or open a ticket at {{SUPPORT_URL}}.