Home » ASP.NET Basics » 11 - Deploying the site
11

Deploying our Site

How to deploy our site

We are ready to deploy our site on a web server. The professional versions of Visual Studio 2005 provide several ways to deploy a web site. The VWD Express Edition also provides a very simple way of web site deployment. This feature is called `Copy Web Site' and it is available within the VWD IDE. Let us use this feature to deploy our web site:

1. Make sure that the web site is complete and free of errors. Build and run the site as explained earlier in this chapter and check all the features.

2. From the `Website' menu, select `Copy Web Site...' option.

3. A new tab will open up in the IDE -

The list on the left hand side displays all the files in our project web site. This is the `Source Web Site'. Now we need to copy these files to the web server, which is the `Remote Web Site'.

Before we can start the copy process, we should connect to the web server where our site will be copied. To do this, click on the `Connect' button. This will display a dialog box:

As shown in the dialog box, we have four options where we can copy our site - File System, Local IIS, FTP Site or Remote Site.

Note: In a real world situation, the ideal options should be an FTP Site or a Remote Site. Alternatively, if we want to deploy the site on a local web server running IIS, we should select Local IIS. The administrator of the web server provides the required information on how to copy our site to the web server. For example, an FTP Site requires the server name, username, password, directory and port. Once we get these from the web server administrator, we can copy our site to the server.

However, for the demonstration purpose in this tutorial, we are selecting the File System option.

4. Select a folder where the site will be copied and click on the `Open' button.

5. Right-click on any file in the `Source Web Site' files list and select the `Select All' option, as we want to copy all the files in our project.

6. Click the arrow button as shown in the figure to copy the files. That is it! We have copied our site to the destination folder.

Though we have copied the site to a local folder, the process is the same for copying the site on a remote web server.