4 min read Sep 26, 2026

Publish from Visual Studio to Windows Hosting over FTP

Create a Visual Studio FTP publish profile for your Windows Hosting plan, publish in one click, and avoid deleting uploads or breaking the live site.

FimuroHost Team

FimuroHost Team

Technical Writer

Share Article

Instead of publishing to a folder and uploading by hand, Visual Studio can publish your ASP.NET (.NET Framework) site straight to your Windows Hosting plan over FTP. Once the profile is set up, each update is one click.

This guide uses Visual Studio 2022; later versions use the same screens.

Before you start

  • Your project targets .NET Framework 4.x and builds in Release mode.
  • You have the FTP host, username and password from FTP Details in StackCP.
  • FTP is unlocked. FTP on StackCP is locked by default. In StackCP, use the FTP panel to unlock it for a period of time or for your current IP address. Publishing fails with a timeout if you skip this.

Web Deploy or FTP?

Visual Studio also offers Web Deploy (MSDeploy). Web Deploy publishing isn't currently part of our shared Windows Hosting plans, so use FTP (as below) or the Folder method. If Web Deploy is essential for your workflow, ask support whether it can be enabled for your plan before relying on it.

Step 1: Find the correct site path

Connect once with FileZilla using your FTP details and note the path of the folder that holds your website (the one containing web.config, or where it should go). On StackCP packages this is normally /public_html. You will enter it as the Site path below.

Step 2: Create the publish profile

  1. In Solution Explorer, right-click your web project and choose Publish.
  2. Click Add a publish profile (or New).
  3. Choose Web Server (IIS), click Next, then choose FTP/FTPS Server.
  4. Fill in the connection:
FieldValue
ServerThe FTP host from StackCP, e.g. ftp.stackcp.com (or ftp.yourdomain.com once your domain points to us)
Site pathThe folder from Step 1, e.g. /public_html
Passive ModeTicked
Anonymous loginNot ticked
Username / PasswordFrom FTP Details in StackCP
Destination URLhttps://yourdomain.com (Visual Studio opens it after publishing)
  1. Click Finish. The profile is saved in Properties\PublishProfiles as a .pubxml file.
  2. Click Show all settings (or More actions → Edit) and check Configuration is Release.

Step 3: Decide about “Delete all existing files”

Under File Publish Options there is a Delete all existing files prior to publish setting. It removes everything in the site path first, including files your visitors uploaded, logs and anything in App_Data. Leave it unticked on a live site. Tick it only for a first deployment into an empty folder, or when you know nothing on the server needs keeping.

Step 4: Publish

  1. Click Publish. The Output window shows each file being transferred.
  2. When it finishes, Visual Studio opens the destination URL. Test the pages you changed.

Visual Studio uploads only files that changed, so later publishes are quicker. If a change to web.config or a DLL doesn't seem to apply, recycle the app pool in StackCP (Web Tools → Manage App Pool).

Keep the live site tidy during updates

While DLLs are being replaced, a visitor can hit a half-updated site. For bigger releases:

  1. Upload an app_offline.htm file (a simple “Back in a few minutes” page) to the site root with FileZilla.
  2. Publish from Visual Studio.
  3. Delete app_offline.htm.

Any simple HTML page works as app_offline.htm, but make it larger than 512 bytes (a short paragraph of text is enough), or some browsers replace it with their own generic error page. It only affects ASP.NET applications, not Classic ASP or PHP pages.

Security tips

  • Visual Studio can save your FTP password in the .pubxml.user file. Never commit *.pubxml.user to Git; it is in the default Visual Studio .gitignore.
  • Plain FTP sends passwords unencrypted. Use a strong, unique FTP password and lock FTP again in StackCP when you are done.
  • Don't publish Web.Debug.config values (such as debug="true") to the live site. Check the transform output before publishing.

Common problems

  • “Unable to connect to the remote server” or timeout. FTP is still locked, or your IP address changed since you unlocked by IP. Unlock again.
  • “530 Login incorrect”. Check the username and password in StackCP FTP Details; copy them again without spaces.
  • Files end up in the wrong folder. The Site path is wrong. Compare it with what you see in FileZilla.
  • Publish succeeds but the site shows an error. See Troubleshooting Common IIS Errors.
  • Network blocks FTP. Some office networks block FTP. Try another connection, such as a mobile hotspot.

Need help?

If something doesn't work as described, open a support ticket from your client area or message us on WhatsApp at 01818160926. Tell us your domain name and the exact error message, and we will take it from there.

FimuroHost Team

Written by

FimuroHost Team

Technical Writer