Saturday 10 April 2010

Copy Website to remote server through FTP in Visual Studio

 

 

To start, you will connect to the FTP Web site from within Visual Web Developer. You must know the FTP address of the FTP Web site and, if it is required, you must have a user name and password.

To access the FTP Web site
  1. In Visual Web Developer, on the File menu, click New Web Site.

  2. In the New Web Site dialog box, in the left-most Location list, click FTP Site, and then click Browse.

  3. In the Choose Location dialog box, in the Server and Directory boxes, enter the appropriate information.

    The Server field refers to the name or IP address of the FTP server. The Directory field refers to a specific directory on the FTP server that you want to put the content in. By default, many FTP sites connect you to a home directory, although there might still be a directory below that or a separate virtual directory where the Web content should be put. If you do not know these values, contact the FTP site administrator.

    For Port, the most common value is 21, but you should confirm that value with the FTP site administrator also.

  4. Examine the following values:

    • Passive Mode

      Leave this check box clear at first. Passive mode is sometimes required, if there is a firewall between your server and the FTP server.

    • Anonymous Login

      If the FTP site administrator has provided you with a user name and password, clear the Anonymous Login check box, and then in the Username andPassword boxes, enter the appropriate information.

  5. Click Open.

    Visual Web Developer will try to connect to the FTP server by using the information that you have provided. If the connection is successful, Visual Web Developer displays the FTP Web site name in Solution Explorer and lists the files that are already in the FTP Web site.

clip_image002

Troubleshooting

If the connection fails, examine the following:

  • If you have administrative rights on the server, use IIS Manager to add the Write permission to the FTP virtual directory. Do not complete this before you have set restricted NTFS File System permissions on the virtual directory, either by using IIS Manager or Microsoft Windows Explorer. For more information, go to Microsoft Technet and search for information about how to help secure FTP sites.

  • Confirm that the server name and directory name are correct.

  • Use the URL of the Web site or the FTP site in the Server field and leave the Directory field blank.

  • Try connecting with Passive Mode enabled. This frequently lets you get through a firewall.

  • Make sure that the FTP Web site has the directory that you have indicated. If you are using IIS as the FTP server, remember that the directory is typically defined under the ftproot directory, not the wwwroot directory.

  • Contact the FTP site administrator to determine whether anonymous log on is allowed. If not, make sure that you have credentials for a user account that has permission to access and modify the FTP directory.

No comments:

Post a Comment