Pre-Deployment Checklist
Use this checklist before deploying your ASP.NET Core application to production on Plesk Windows hosting.
1. Configuration
- ☐ Set
ASPNETCORE_ENVIRONMENTtoProduction - ☐ Create
appsettings.Production.jsonwith production settings - ☐ Remove or secure any development endpoints
- ☐ Verify connection strings point to production database
- ☐ Configure proper logging levels (Warning or Error)
2. Security
- ☐ Enable HTTPS redirection
- ☐ Configure HSTS (HTTP Strict Transport Security)
- ☐ Remove sensitive data from appsettings.json
- ☐ Use environment variables for secrets
- ☐ Enable Data Protection with persistent keys
- ☐ Configure CORS properly (no AllowAnyOrigin)
- ☐ Validate and sanitize all user inputs
3. Performance
- ☐ Enable Response Compression
- ☐ Configure Response Caching where appropriate
- ☐ Minify CSS and JavaScript
- ☐ Optimize images
- ☐ Enable static file caching headers
4. Error Handling
- ☐ Configure custom error pages
- ☐ Disable developer exception page in production
- ☐ Set up global exception handling
- ☐ Configure logging to persistent storage
5. Database
- ☐ Run all pending migrations
- ☐ Backup existing production database
- ☐ Test database connectivity
- ☐ Add TrustServerCertificate=True to connection string
6. Build and Publish
- ☐ Build in Release configuration
- ☐ Run all tests
- ☐ Publish with correct target framework
dotnet publish -c Release -o ./publish
7. Plesk Configuration
- ☐ Set correct .NET Core version in Hosting Settings
- ☐ Set Application Startup File correctly
- ☐ Verify SSL certificate is installed
- ☐ Enable HTTPS redirect
- ☐ Configure Application Pool memory limits
8. Post-Deployment
- ☐ Test all critical functionality
- ☐ Verify forms and user inputs work
- ☐ Check for console errors in browser
- ☐ Monitor application logs for first 24 hours
- ☐ Test on multiple devices/browsers
Essential web.config Settings
<aspNetCore processPath="dotnet"
arguments=".\YourApp.dll"
stdoutLogEnabled="false"
stdoutLogFile=".\logs\stdout"
hostingModel="inprocess">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" />
</environmentVariables>
</aspNetCore>
Rollback Plan
- Keep previous version files backed up
- Document steps to revert database changes
- Know how to quickly switch back in Plesk