# Deploy an ASP.NET site on Windows hosting with Plesk

> Put an ASP.NET or ASP.NET Core site live on HyperDC Windows hosting: publish it, upload the files to Plesk, create an MSSQL database, connect it and add HTTPS.

Difficulty: Intermediate

HyperDC **Windows hosting** runs your site on **Microsoft IIS** with ASP.NET support, **Microsoft SQL Server** and MySQL databases, managed in **Plesk**. This guide takes an application from your computer to a live, secured site.

## Before you start

- Your Windows hosting service is active; open Plesk from **Services › My Services**, the hosting service, then the sign-in button; see [log in to your control panel](/guides/log-in-to-your-control-panel).
- Your domain points to the hosting account; see [point a domain to your server](/guides/point-domain-to-server).
- The application builds and runs on your own computer.
- If it needs a specific .NET or ASP.NET Core version, you have confirmed it with us in a ticket.

## Step 1: Publish the application

**ASP.NET Core**

Publish to a folder outside the project folder, so that later publishes do not nest:

```powershell
dotnet publish -c Release -o ..\publish
```

The output contains your application's `.dll` files and a `web.config` that tells IIS to start the app.
**ASP.NET (.NET Framework)**

In Visual Studio, choose **Publish**, pick a **Folder** target and publish. Upload the content of that folder; it includes `web.config`, `bin` and your pages.

**Verify:** the output folder contains `web.config`.

## Step 2: Upload the files

1. In Plesk, open **Websites & Domains** and the domain's **File Manager**, or connect with FTP; see [upload website files](/guides/upload-files-ftp-sftp).
2. Open the document root, `httpdocs` by default.
3. Upload the **content** of the publish folder (not the folder itself), replacing the default page.

**Web Deploy** is enabled by default on our Windows hosting. Instead of uploading files, you can publish from Visual Studio: in Plesk, download **Web Deploy Publishing Settings** for the domain and import that file in Visual Studio's publish dialog. Visual Studio takes over every setting except the password, which you enter yourself.

Your Plesk account also includes further advanced web tools for your sites; you find them with the domain under **Websites & Domains**.

## Step 3: Create the database

1. In Plesk, open **Databases** and click **Add Database**.
2. Choose the **Microsoft SQL Server** database server (or MySQL), enter a database name and create a database user with a strong password.
3. Open **Connection Info** under the database name. It shows the host name to use; for SQL Server this can include an instance name, such as `server\INSTANCE`.

## Step 4: Connect the application

Put the details from **Connection Info** into your connection string, in `appsettings.json` (ASP.NET Core) or `web.config` (ASP.NET):

```json
{
  "ConnectionStrings": {
    "DefaultConnection": "Server=HOST_FROM_PLESK;Database=example_db;User Id=example_user;Password=YOUR_PASSWORD;"
  }
}
```

> **Note**
>
> `Microsoft.Data.SqlClient` 4.0 and later encrypt the connection by default. If the connection fails with a certificate error, see [ASP.NET and IIS errors](/guides/aspnet-iis-errors).

## Step 5: Open the site and turn on HTTPS

1. Open `http://example.com`. The first request can take a few seconds while the application starts.
2. Secure the domain with the free certificate and redirect HTTP to HTTPS; see [turn on free SSL and force HTTPS](/guides/hosting-free-ssl-https).

**Verify:** `https://example.com` loads your application with a padlock.

## Step 6: Adjust the ASP.NET settings (ASP.NET)

For .NET Framework sites, Plesk's **ASP.NET Settings** for the domain let you set custom error pages, the session timeout, and compilation and globalization options without editing `web.config` by hand.

## Troubleshooting

**You see the Plesk default page or a directory error.** The files are not in `httpdocs`, or you uploaded the publish folder itself instead of its content.

**An HTTP 500.xx error appears.** The number after the dot names the cause; see [ASP.NET and IIS errors](/guides/aspnet-iis-errors).

**Files cannot be overwritten because they are in use (ASP.NET Core).** A running app locks its files. Upload an empty file named `app_offline.htm` to `httpdocs` first: the ASP.NET Core Module stops the app and shows that page. Upload the new files, then delete `app_offline.htm` to start the app again.

## Next steps

- Errors after deploying: [ASP.NET and IIS errors](/guides/aspnet-iis-errors).
- Keep a copy before each release: [back up and restore your hosting account](/guides/hosting-backup-restore).

## Frequently asked questions

### Which .NET versions can I use?

ASP.NET is supported on every plan. If your application needs a specific .NET or ASP.NET Core version, ask us in a ticket before you deploy and we confirm whether the server offers it.

### Can I publish straight from Visual Studio?

Yes. Web Deploy is enabled by default on our Windows hosting. Download Web Deploy Publishing Settings for your site in Plesk and import the file into the Visual Studio publish dialog.

### Where do the files go?

Into the site's document root, httpdocs by default. The web.config file must sit in that folder, next to your application's files.

### Can I use MySQL instead of SQL Server?

Yes. Every Windows hosting plan includes MySQL databases as well; create one in Plesk and use a MySQL connector for .NET in your application.

---

Source: <https://hyperdc.com/guides/products/deploy-aspnet-plesk>\
Updated: 2026-10-16
