Quick Note About IIS 7.5 FTP Virtual Hosts

With the release of IIS 7.5 (available in Windows Server 2008 R2 and Windows 7), FTP is finally re-integrated into the main IIS Manager.  Those of you still using 7.0 know that you need to use the IIS 6 Manager to manage FTP sites.  One of the great new features in IIS 7.5 FTP is the ability to setup virtual hosts for FTP (multiple FTP sites on port 21 with the same IP) similar to how you would setup web sites with host headers in IIS.  One of the trip ups when you attempt to log in to FTP is the user name needs to include the virtual host name.  Consider the following setup:
IIS Bindings
Notice that one of the bindings is ftp:192.168.1.101:21:cfbeam.localhost, when you actually connect with an FTP client the username needs to be entered as:

VirtualHost|UserName
Notice the pipe (|) between the virtual host and the user name.  Assuming you don’t put that in, you’ll likely see the following in the IIS FTP logs and in your FTP client:
Response:    220 Microsoft FTP Service
Command:    USER brent
Response:    530-Valid hostname is expected.
Response:     Win32 error:   No such host is known.
Response:     Error details: Hostname didn’t match any configured ftp site.
Response:    530 End
Error:    Could not connect to server

For more information on configuring virtual hosts in IIS 7.5 see http://learn.iis.net/page.aspx/320/using-ftp-virtual-host-names/

6 thoughts on “Quick Note About IIS 7.5 FTP Virtual Hosts”

  1. Tip for everyone:

    Don’t forget to add READ/WRITE permissions to your ftp user in the SECURITY->EDIT options of your site directiry, or you will get an ACCESS DENIED ERROR in your FTP-client.

  2. and how the hell Microsoft smat a55es think it will work from a unix box where the pipe sign is to widely used by everything else ???

Leave a Reply

Your email address will not be published. Required fields are marked *