Use the Copy Web Site Tool

Learning Resources
 

Use the Copy Web Site Tool


The Copy Web Site tool enables you to open a folder on a target site (which can be on a remote computer or just a different folder on the same computer), and then copy files between the source Web site and the target Web site. The tool supports the following features:

  • You can copy source files, including.aspx files and class files, to the target site. The Web pages are compiled dynamically when they are requested on the target server.

  • You can copy files by using any connection protocol that is supported by Visual Studio. This includes local Internet Information Services (IIS), Remote IIS, and FTP. If you use HTTP protocol, the target server must have FrontPage Server Extensions.

  • The synchronization feature examines the files in the source and target Web sites, informs you about which files are more current in each site, and enables you choose which files you want to copy and the direction in which you want to copy them.

  • Before you copy application files, the Copy Web Site tool puts a file that is named App_offline.htm into the root directory of the target Web site. While the App_offline.htm file exists, any requests to the Web site are redirected to this file. The file displays a friendly message that tells clients that the Web site is being updated. When all Web site files have been copied, the Copy Web Site tool deletes the App_offline.htm file from the target Web site.

You can use the Copy Web Site tool to copy all files or individual files. In this part of the walkthrough, you will create a new Web page in the source Web site, and then copy the new Web page file to the shared Web site.

To create and copy an individual file

  1. In Solution Explorer, right-click the name of the Web site, and then click Add New Item.

  2. Under Visual Studio installed templates, click Web Form.

  3. In the Name box, type Extra.aspx.

  4. Click Add.

    You do not have to add any content to the page.

  5. Close the page.

    The new page is displayed in Source Web Site with arrows next to it pointing to Remote Web Site. If you synchronize right now, the files will be copied from the local Web site to the shared Web site.

  6. On the Copy Web tab, highlight to select the new page or pages.

  7. Click the right/left-arrow button to copy the selected files from the local Web site to the shared Web site.

    This button is not labeled unless you move the pointer over it, in which case a ToolTip appears.

    The new page is copied to the shared Web site and the list in Remote Web Site is updated.

 

--Microsoft
 For Support