Managing ASP.NET Core & MSSQL on Plesk: A Complete Guide
Deploy an ASP.NET Core app with SQL Server on Windows Server using Plesk: install the .NET hosting bundle, create the database, publish code, configure IIS, and secure your site.
5 min read
Deploying an ASP.NET Core application that uses Microsoft SQL Server on a Windows Server with Plesk can feel intimidating for newcomers. This guide walks you through every step—from creating the database to configuring IIS—so you can launch your site quickly and securely.
1. Prerequisites
Plesk 18.0 or newer on Windows Server (2016, 2019, or 2022).
A licensed Microsoft SQL Server instance (Express, Standard, or Enterprise) that is reachable from the server.
The .NET Core Hosting Bundle installed (provides the runtime, ASP.NET Core module for IIS, and the installer).
Administrative access to Plesk and the Windows Server (RDP or PowerShell).
2. Install the .NET Core Hosting Bundle
The bundle adds the ASP.NET Core module to IIS, letting IIS forward requests to Kestrel.
Run the installer with administrative rights, accept the license, and let it finish.
After installation, restart IIS so the new module is loaded:
iisreset
This command stops and starts the IIS service.
3. Create an MSSQL Database in Plesk
Plesk’s GUI makes database and user creation straightforward.
Log in to Plesk and go to Databases → Add Database.
Choose Microsoft SQL Server as the database type.
Enter a name (e.g., MyAppDb) and click OK.
Open the database’s details page.
Under Database Users, click Add Database User:
Specify a username (e.g., myapp_user) and a strong password.
Assign the db_owner role for full access.
Note the Server name (often localhost\SQLEXPRESS or your named instance) and the credentials you just created. You’ll use these in the connection string.
4. Deploy Your ASP.NET Core Application via Plesk
Plesk supports two common deployment methods: Git or a ZIP package.
4.1. Using Git
Navigate to Websites & Domains → Git → Add Repository.
Select Remote Git Repository and enter the repository URL (GitHub, GitLab, Bitbucket, etc.).
Choose the branch to deploy (e.g., main) and set the deployment path to the domain’s httpdocs folder.
Click OK. Plesk will clone the repo into the web root.
Open the Plesk control panel, navigate to Domains → your domain → Apache & nginx Settings (this page allows environment variable configuration on Windows).
This creates a system-wide variable that .NET reads at startup.
Restart the site’s application pool (via IIS Manager or iisreset) so the new variable is loaded.
7. Test the Deployment
Open a browser and go to http://yourdomain.com. The default page of your ASP.NET Core app should appear.
To confirm database connectivity, add a simple endpoint (e.g., /health) that queries a table and returns OK if successful.
If you see an error, review the following logs:
IIS logs – %SystemDrive%\inetpub\logs\LogFiles
ASP.NET Core stdout log – enable by setting stdoutLogEnabled="true" in web.config and specifying a stdoutLogFile path.
SQL Server error log – C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\errorlog
8. Secure Your Application
Enable HTTPS in Plesk: go to Websites & Domains → SSL/TLS Certificates, install a certificate (Let’s Encrypt is free), and enable Force HTTPS.
Restrict SQL Server access by allowing only the local IP (127.0.0.1) or a specific IP range in the firewall.
Use Windows Authentication when possible. If IIS and SQL Server run under the same domain account, set Integrated Security=True in the connection string to avoid storing passwords.
Conclusion
Running an ASP.NET Core application with a Microsoft SQL Server backend on a Windows Server managed by Plesk requires a few clear steps: install the hosting bundle, create the database, deploy the code, configure IIS, and set a secure connection string. Following this guide gives you a production-ready environment without deep Windows administration knowledge. Keep an eye on IIS and SQL Server logs, update the .NET runtime when new releases appear, and apply security patches to maintain a stable platform.
asp.net coremicrosoft sql serverwindows serverpleskiisdeployment.net hosting bundlesecurity
Try it on your own server
Follow along on a Cloud VPS with full root access, or read the step-by-step knowledge base guides.