ASP.NET & .NET Development

Automating ASP.NET Deployment via Plesk Panel: A How-To Guide

By the Domain India teamPublished 7 min read
Knowledge base article
Contents (8 sections)

Automating a deployment means that one command, or one push to your repository, builds your ASP.NET app and puts it live without you dragging files around. On shared Windows hosting the server cannot build your code for you, so automation happens on your side: your computer or a CI service builds the app, then uploads the result to Plesk. This guide shows a workflow that works on every Domain India Windows plan.

Key takeaways

Build on your own machine or in CI (for example GitHub Actions) with dotnet publish, then upload the output to httpdocs over FTP with explicit TLS. Wrap the upload with app_offline.htm so IIS releases its locked DLLs. There is no SSH on Windows hosting, and the server cannot run git pull or dotnet build for you. Web Deploy is listed on the plans, but ask support to confirm it for your subscription before you script around it.

New to deploying ASP.NET in Plesk?

Do one manual deployment first, so you know the app works on the server. How to deploy an ASP.NET application in Plesk walks through it. Automate only the steps you have already done by hand.

1. What you can and can't automate on shared Windows hosting

Works
  • Building and publishing on your PC or in a CI service
  • Uploading with FTP on port 21 using explicit TLS
  • Taking the app offline with app_offline.htm during the upload
  • Restarting the app by re-uploading web.config
Not available
  • SSH, SFTP or running commands on the server
  • Building on the server with git pull and dotnet build
  • Installing tools, runtimes or services on the server
  • Restarting IIS for the whole server

The old approach of a Plesk scheduled task running git pull and dotnet publish on the server does not apply to shared hosting: those tools are not yours to run there.

2. The deployment pipeline

Every automated deployment follows the same five steps:

  1. Build.
    Run dotnet publish -c Release -o ./publish on the build machine.
  2. Take the app offline.
    Upload app_offline.htm into httpdocs. IIS stops the app and shows that page, which releases locked DLLs.
  3. Upload.
    Copy the contents of publish into httpdocs, overwriting changed files.
  4. Bring it back.
    Delete app_offline.htm. The app starts on the next request.
  5. Check.
    Request the home page and one page that touches the database, and fail the job if either does not return 200.

Keep app_offline.htm small, with a plain "Back in a few minutes" message.

3. A script for your own computer

WinSCP can run scripted FTP uploads with explicit TLS. Save this as deploy.txt, with your own FTP details:

text
open ftpes://FTP_USER:[email protected]/
put app_offline.htm /httpdocs/
synchronize remote -delete -filemask="|app_offline.htm; App_Data/" .\publish /httpdocs
rm /httpdocs/app_offline.htm
exit

Then run it after publishing:

powershell
dotnet publish -c Release -o ./publish
winscp.com /script=deploy.txt

The -delete switch removes files on the server that are no longer in your build, and the file mask keeps app_offline.htm and the App_Data folder out of the sync. Add any other folder your app writes to at runtime, such as uploaded images, to the mask, and test once without -delete. If your password contains special characters, URL-encode them in the open line, or keep the password in a WinSCP stored session instead.

4. Deploying from GitHub Actions

A CI job does the same thing on every push. The build part is standard:

yaml
- uses: actions/setup-dotnet@v4
  with:
    dotnet-version: '8.0.x'
- run: dotnet publish -c Release -o ./publish

For the upload, use an FTP client or action that supports explicit FTPS (FTP over TLS on port 21) and can upload app_offline.htm before the files and delete it afterwards. Store the FTP username and password as repository secrets, never in the workflow file.

Set dotnet-version to the version your app targets, and check in Plesk that the server offers it, or publish self-contained with -r win-x64 --self-contained true.

5. Web Deploy from Visual Studio or CI

Web Deploy (MSDeploy) is listed on the Windows plans and can publish directly from Visual Studio or a pipeline. When we checked from outside in September 2026, the Web Deploy service did not respond as a working endpoint, so ask support to confirm it is enabled for your subscription and to send the publish settings before you build your automation on it. FTP with explicit TLS works without any extra setup.

6. Database changes during a deployment

Your build machine cannot reach the hosted database directly: the SQL Server port is closed from outside. Two options work:

  • Apply migrations when the app starts, for example by calling Database.Migrate() in Entity Framework Core at startup. Simple, but a failed migration stops the app from starting.
  • Generate a SQL script with dotnet ef migrations script --idempotent and run it with the database tools in Plesk before the upload.

More detail is in Setting up databases for ASP.NET.

7. Rolling back

Keep the last good publish folder, or tag each release in Git. To roll back, run the same deployment with the previous build. Download a copy of httpdocs before large changes as well; creating backups in Plesk explains your options.

8. Where Domain India Windows hosting fits

Every Windows plan includes Plesk and FTP with explicit TLS, so the pipeline above works on all of them. The cards show live prices, excluding 18% GST.

ASP Starter
₹164.87/mo + GST
  • 10 GB Storage
  • 50 GB Monthly Bandwidth
  • 1 Website
  • 10 Email Accounts
See plan details
ASP Business
₹328.83/mo + GST
  • 30 GB Storage
  • 150 GB Monthly Bandwidth
  • 5 Websites
  • 50 Email Accounts
See plan details

If you want push-to-deploy with the server doing the build, the App Platform builds Node.js apps automatically and other stacks from a Dockerfile. It is a separate product from Windows hosting.

Can Plesk pull my code from Git and build it on the server?

Not on Domain India shared Windows hosting. The server cannot run git or dotnet build for you. Build and publish on your own computer or in a CI service, then upload the output with FTP using explicit TLS.

Why does my automated upload fail with a file-in-use error?

IIS keeps the running app's DLLs open. Upload app_offline.htm into httpdocs before copying the new files, then delete it when the upload finishes.

Which FTP settings should my script use?

Your domain as the host, port 21, and explicit FTP over TLS (FTPES), with your FTP username and password. SFTP is not available because Windows hosting has no SSH.

Does Web Deploy work for automated publishing?

Web Deploy is listed on the Windows plans. Ask support to confirm it is enabled for your subscription and to send the publish settings before you rely on it. FTP with explicit TLS works without extra setup.

How do I run database migrations in an automated deployment?

Either apply Entity Framework Core migrations at application startup, or generate an idempotent SQL script and run it with the database tools in Plesk. Your build machine cannot connect to the hosted SQL Server directly.

Ready to automate your .NET deployments? Compare the Windows hosting plans, or open a ticket if you want support to check Web Deploy for your account. Support is on 24/7 live chat, and tickets get a first response within 15 minutes.

Deploy ASP.NET with Domain India

Plesk, IIS and MSSQL on every Windows plan, with a 30-day refund on new shared hosting.

See Windows hosting plans

Was this article helpful?

Your answer helps us decide what to improve next.

Still need help? Open a support ticket and our team will reply.

Prefer an app? Add this site to your home screen.Get the app
Automate ASP.NET Deployment to Plesk Hosting