Uploading your Project to a Host

Introduction

If you are lucky you can use Visual Studio's built in functionality to upload your site and manage the files. However, if your internet host does not support this or does not allow the kind of access you are used to on your development machine we are stuck doing things manually. We will take for instance the popular GoDaddy as your host. GoDaddy prevents most forms of direct connection with your site, instead asking you to use built in management tools which forces certain techniques in uploading and maintaining a site.

Getting your pages uploaded
This is probably the easiest part because all hosts will provide a means to upload using FTP. We recommend FileZilla.

You can either copy all of your sources to the site and have ASP.Net automatically compile a binary the first time any of your pages is loaded or you can copy just the assemblies that make up your site if you use msbuild.exe to compile your project.

Getting your data and database transferred.
There are two phases in getting your data sent to the server, we needed to do both since we have preloaded data in our database. Copying the database schema is straightforward, the potentially complicated part of this process is getting your data copied from your local server over to the host's servers. Here, we cover using SQL Server to do this.

First you must copy over the database schema. Once again, assuming you don't have access to the SQL Server's directly the most efficient way to do this is to go into SQL Management Studio and generate a set of scripts. To do this first select the database you want to script and then right click it to navigate to Generate Scripts.


Figure 1: Generating Scripts
This will bring you to a wizard that will first ask you for a database.


Figure 2: Database Selection
and then options for generating the script. If you are scripting on top of an existing schema you will more than likely want to also select "Script Drop" so that your tables/stored procedures/etc. will not cross contaminate the existing schema. Make sure that "Include if NOT EXISTS" to ensure the best scripts for updating into an existing schema and also "Script Indexes" to make sure you still are performant once uploaded.


Figure 3: Script Options
Choose to script everything except the schema to ensure your security still works and that the entire database is represented in the script.


Figure 4: Object Types
The next several pages will ask you what specific objects you want to script. Most likely you will just want to click the Select All button.

Finally chose your script output options. We'd recommend "Script to New Query Window". Press "Finish" and wait until the script processing is done. The next step is to enter the SQL Editor\Query Analyzer provided by the host. Simply copy and paste the entire script into the Window and press the Execute button


Figure 5: GoDaddy Web-based Query Analyzer
Continue on with transferring your data: Page 2