Overview
This guide covers deploying classic ASP.NET Framework applications (Web Forms, MVC 5, Web API 2) to your Windows hosting. These applications use the .NET Framework 4.x runtime, not .NET Core/.NET 10.
Supported Versions
- .NET Framework 4.5, 4.6, 4.7, 4.8
- ASP.NET Web Forms
- ASP.NET MVC 3, 4, 5
- ASP.NET Web API 1, 2
- WCF Services
Publishing Your Application
From Visual Studio:
- Right-click your project → Publish
- Select Folder as target
- Choose a local folder path
- Click Publish
Important Settings:
- Configuration: Release
- Target Framework: Should match your project
- Precompile during publishing: Recommended for production
Uploading to Plesk
Option 1: File Manager
- Log in to Plesk
- Go to Websites & Domains → File Manager
- Navigate to httpdocs
- Upload all files from your publish folder
Option 2: FTP
- Connect using FTP credentials from Plesk
- Navigate to /httpdocs
- Upload all files from your publish folder
- Use binary mode for DLL files
Configuring ASP.NET in Plesk
Set ASP.NET Version:
- Go to Websites & Domains
- Select your domain
- Click Hosting Settings
- Under ASP.NET, select appropriate version
- Click OK
Or via ASP.NET Settings:
- Go to Websites & Domains
- Click ASP.NET Settings
- Configure application-specific settings
Web.config Configuration
Basic Web.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="DefaultConnection"
connectionString="Server=localhost;Database=mydb;User Id=myuser;Password=mypass;"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="false" targetFramework="4.8" />
<httpRuntime targetFramework="4.8" />
<customErrors mode="RemoteOnly" defaultRedirect="/Error" />
</system.web>
</configuration>
Important Settings:
- debug="false": Always use false in production
- customErrors: Hide detailed errors from public
- targetFramework: Match your application version
Common File Structure
httpdocs/ ├── bin/ (compiled DLLs) ├── Content/ (CSS, images) ├── Scripts/ (JavaScript) ├── Views/ (MVC views) ├── Global.asax ├── Web.config └── Default.aspx (or other entry point)
Troubleshooting
Yellow Screen of Death (YSOD)
- Check
Web.configfor syntax errors - Verify all DLLs are in the
binfolder - Check application event logs
HTTP 500 - Internal Server Error
- Temporarily set
customErrors mode="Off" - Refresh to see detailed error
- Fix the issue
- Set
customErrors mode="RemoteOnly"again
Missing DLL Errors
- Ensure all referenced DLLs are in the
binfolder - Use "Copy Local = True" for NuGet packages
- Publish with all dependencies included
Database Connection Failed
- Use
localhostfor server name - Verify credentials match Plesk database settings
- Check connection string syntax
Application Pool Considerations
Your ASP.NET Framework app runs in an IIS Application Pool configured for .NET 4.x. If you experience issues:
- Contact support to verify pool settings
- Integrated pipeline mode is recommended
- 32-bit vs 64-bit may affect some applications
Security Best Practices
- Set
debug="false"in production - Use
customErrorsto hide detailed errors - Store connection strings securely
- Keep .NET Framework updated
- Use HTTPS for all traffic