Shared hosting is a hosting model where multiple customers share the same physical server. Cheap, easy to set up — but limited.
No SSH access, no root privileges, can't install the services you want. File management is done via FTP, and application management is done through panels like Plesk or cPanel.
Running ASP.NET Core applications on shared hosting is possible — but you need to know a few important things.
A large project can consist of multiple ASP.NET Core applications. Each subdomain can be a separate application:
If all these applications share the same IIS app pool, outofprocess is required. The crash of one application should not affect the others.
Migration also needs attention. If you use MigrateAsync() in Program.cs, there may be a few seconds of delay on first startup — this is normal.
Going through this list before every deploy prevents hours of debugging later:
The most common errors encountered when doing a production deploy on shared hosting, and their solutions:
1. Plesk subscription plan conflict
When creating a new subscription, disk_space, mssql_dbase_space, or total_mboxes_quota quotas may conflict. Solution: select "none" as the subscription plan (Custom mode), set quotas to Unlimited one by one.
2. Connection string key mismatch
Writing GetConnectionString("database") but putting ConnectionStrings__DefaultConnection in the env var — it doesn't match, returns null, connection fails. The end of the key must exactly match the C# code.
3. Missing TrustServerCertificate
Connection is established but a SqlException is thrown during login. Add TrustServerCertificate=True to the connection string.
4. appsettings.Production.json went into publish
If the CopyToPublishDirectory=Never setting was forgotten, this file goes to the server. Check this setting to make sure secrets are not in the publish output.
After deploy is complete, sequential test steps to verify the application is actually working:
/api/ping. It should be [AllowAnonymous].