Unexpected errors when setting up FTP site in IIS 6 on Windows 2003


One of my coworkers called me over today to look at an issue they were having setting up an FTP Site. They could only run the FTP site when the Default Website was stopped. These are the error messages that came up during troubleshooting:

Error: Unexpected error 0x8ffe2740

Error: The process cannot access the file because it is currently being used by another process.

 

 

Notes:

  • Windows Server 2003 Enterprise x64
  • IIS 6 installed
  • HTTP and FTP sites configured

Root cause:

  • The Default website was bound to port 21 in addition to port 80

Resolution:

  • Unbind port 21 from the Default website

 

Troubleshooting steps:

  1. Start the FTP site first, then start the Default website. Got this message: 
    • Error: The process cannot access the file because it is currently being used by another process.
  2. Start the Default Website first, then start the Default website. Got this message:
    • Error: Unexpected error 0x8ffe2740
  3. Given the messages, I tried loading the FileZilla FTP server. After installation, I found these errors in the Filezilla server log:
    • Connecting to server...
      Connected, waiting for authentication
      Logged on
      Creating listen socket on port 21...
      Failed to create listen socket on port 21 for IPv4
      Failed to create listen socket on port 21 for IPv6
      Failed to create a listen socket on any of the specified ports. Server is not online!


      From these messages I knew we were dealing with a port assignment issue rather than some arcane issue involving file access
  4. Upon checking the default website, we found that someone had assigned port 21 to the default website. Removing this port assignment enabled the FTP site to work correctly under both IIS and FileZilla.