This page is obsolete - Please see Server Deployment for more information.
If you're using Shared Hosting, make sure that your provider matches the general requirements for YetaWF shown in Server Deployment and the following:
- FTP access - this is required to upload the YetaWF site
- Ability to unzip a file, typically through a Control Panel (a manual process)
- When using SQL DBs for your site, you must be able to define SQL DBs and restore them, typically through a Control Panel (a manual process)
If your hosting provider doesn't allow each of these items, YetaWF cannot be hosted.
Using Visual Studio's Publish feature is NOT recommended, because YetaWF makes extensive use of symbolic links from the website to source packages, which cannot be deployed by Visual Studio.
Follow these steps to deploy your site to a Shared Hosting server. It is assumed that you have the site running locally on your development system and are using the same domain name locally (using your ).
- Update the file ".\Utilities\CopySite\CopySite FROM DEV.txt" to reflect your site details
- If your site is using SQL DBs, make sure to update the connection strings in your site's AppSettings.Prod.json file - This file is renamed to AppSettings.json by the CopySite utility when your site is uploaded - Your development system's AppSettings.json file is NOT used on the server
- Make any other changes in AppSettings.Prod.json for your site as needed
- Rebuild your site in Visual Studio (Build All, Release)
- ASP.NET Core Only: Deploy website using Visual Studio to a temporary folder using the "File System" publish method
- Execute ".\Utilities\CopySite\CopySite FROM DEV.bat" to zip all files and transfer your site to your hosting server
Updating "CopySite FROM DEV.txt"
The CopySite utility will zip your website files, backup your SQL DBs (if any) and upload the resulting file to your hosting provider. In order to do so, you have to customize the "CopySite FROM DEV.txt" file, which contains information specific to your local development system. The "CopySite FROM DEV.txt" file is located at ".\Utilities\CopySite", relative to your YetaWF solution folder.
Once you have configured this file you won't have to modify it again unless your web server changes.
# SQL Databases
# Development system DBs (adjust as needed)
# additional DevDB statements if you have more DBs
# ASP.NET Core sites are first published using Visual Studio (manually), then deployed from the target location where the site was published.
# Specify an absolute path - The PublishOutput statement is required for ASP.NET Core sites and not allowed for ASP.NET 4 sites.
# Relative location of the website we want to deploy
# The location where the zip file is created
# The config file portion that is used for app.config, AppSettings.json, hosting.json, web.config.
# Optional. When specified, the config file name adds the specified ConfigParm string before the extension. The ConfigParm string can contain periods.
# In this example, the files app.Prod.config, AppSettings.Prod.json, hosting.Prod.json and Web.Prod.config are copied for deployment
# named app.config, AppSettings.json, hosting.json, web.config on the deployed site.
# If one of the files app.Prod.config, AppSettings.Prod.json, hosting.Prod.json or Web.Prod.config does not exist, the matching
# file (without the ConfigParm string) is copied instead.
# The name of the web.config file to use on the site (located at SiteLocation)
# The ConfigFile statement should no longer be used - Use ConfigParm instead
# Additional folders to copy (part of Zip file - must match folders in PROD) - PRIVATE HOSTING ONLY
# Define what to upload
# .\TEMP\Website.zip is the file to be uploaded (local path), /Website.zip is the full path of the zip file on the server (adjust as needed)
Upload ftp://serveraddress, ftpuser, ftppassword, .\TEMP\Website.zip, /Website.zip
# additional Upload statements if needed
# The following Upload statements are for PRIVATE HOSTING ONLY
Upload ftp://serveraddress, ftpuser, ftppassword, .\CopySite PROD.txt, /CopySite PROD.txt
Upload ftp://serveraddress, ftpuser, ftppassword, .\CopySite PROD.bat, /CopySite PROD.bat
# Define folders to upload (not part of Zip file) - PRIVATE HOSTING ONLY
# The CopySite utility is needed to unpack the zip file so we have to copy it outside the zip file
UploadFolder ftp://serveraddress, ftpuser, ftppassword, .\Bin, /Utilities/CopySite/Bin
Add a DevDB statement for each SQL database you want to transfer to your hosting provider. If you don't use SQL DBs, remove the DevDB statements.
|yourDEVdatabasename||The name of your database on the development system.|
|yourPRODdatabasename||The name of your database on the server.|
|sqlservername||The SQL server name on the development system.|
|username||User login information for the SQL server name on the development system.|
|password||User login information for the SQL server name on the development system.|
ASP.NET Core only: The PublishOutput statement defines where your website was published by Visual Studio. This step is required for ASP.NET Core sites. The folder defined by the PublishOutput statement must match the folder used as target folder when publishing your site using the "File System" publish method.
The SiteLocation statement defines where your site files are located on your development system, relative to the "CopySite FROM DEV.txt" file. You normally don't need to change this.
The ZipFile statement defines where the zip file is created. You normally don't need to change this. The zip file contains all files for your website (including SQL DBs).
Defines the file name for all configuration files (app.config, AppSettings.json, hosting.json, web.config). When specified, the specified ConfigParm string is added to the config file name before the extension. The ConfigParm string can contain periods. For example, then ConfigParm Prod is specified, the files app.Prod.config, AppSettings.Prod.json, hosting.Prod.json and Web.Prod.config are copied for deployment and are named app.config, AppSettings.json, hosting.json, web.config on the deployed site. If one of the files app.Prod.config, AppSettings.Prod.json, hosting.Prod.json or Web.Prod.config does not exist on the development system, the matching file (without the ConfigParm string) is copied instead.
Do not use - This has been replaced by the ConfigParm statement.
The ConfigFile statement defines which file is copied to your server as Web.config file. This file is renamed to Web.Config by the CopySite utility when your site is uploaded - Your development system's Web.Config file is NOT used on the server. The default file used by a standard YetaWF installation is Web.Prod.config but you can rename the file so it reflects your site's name.
The Upload statement defines what files are uploaded. Multiple Upload statements are allowed. Typically 3 files are listed, but for Shared Hosting only the Upload statement listing the zip file is needed.
The Upload statement requires the following parameters.
|serveraddress||The FTP address of the hosting server - Your hosting provider has to provide this information|
|ftpuser||The FTP login assigned to you by your hosting provider|
|ftppassword||The FTP password assigned to you by your hosting provider|
|.\TEMP\Website.zip||The source location of a local file to transfer to your server|
|/Website.zip||The target location/name of the file on your server|
The UploadFolder statement defines what folders are uploaded without including them in the zip file. Multiple UploadFolder statements are allowed. For Shared Hosting this is not typically used.
Run CopySite - Development System
Assuming your "CopySite FROM DEV.txt" file has been updated and you have rebuilt your site (Release build), you're ready to upload your site by running CopySite.
.\Utilities\CopySite\CopySite FROM DEV.bat
This will upload all relevant files to your hosting provider. Once the zip file has been uploaded, proceed to the hosting server. If any errors occur, these are most likely caused by incorrect definitions in CopySite.txt.
If you accidentally try to deploy a Debug build, CopySite will warn you.
Once the Zip file has been uploaded to your hosting provider, unzip the file. The exact method to do so depends on your hosting provider.
If you are using SQL DBs, make sure to restore these on your server. CopySite uploads SQL DB backups into the DBs folder of your site. The exact method to restore SQL DBs depends on your hosting provider. After restoring the DBs, make sure to delete the backup files.
You have completed all the steps to upload your site and are ready to start it up.