Share via

IFtpHomeDirectoryProvider Interface (Managed)


Provides an interface to implement returning the physical path for a user's home directory.


public interface IFtpHomeDirectoryProvider  
Public Interface IFtpHomeDirectoryProvider  


The following table lists the methods exposed by the IFtpHomeDirectoryProvider interface.

Method Name Definition
GetUserHomeDirectoryData Returns the physical path of the home directory for a user.


The following code example illustrates using the IFtpHomeDirectoryProvider interface to create a custom home directory module for the FTP service that returns a specific home directory.

using System;  
using Microsoft.Web.FtpServer;  
namespace FtpHomeDirectory  
   public class FtpHomeDirDemo : BaseProvider,  
      string IFtpHomeDirectoryProvider.GetUserHomeDirectoryData(  
         string sessionId,  
         string siteName,  
         string userName)  
         // Note: You would add your own custom logic here.  
         // Return the user's home directory based on their user name.  
         return @"C:\Ftpusers\" + userName;  

For an additional example, see How to Use Managed Code (C#) to Create a Simple FTP Home Directory Provider.


Type Description
Client - IIS 7.5 on Windows 7
- IIS 8.0 on Windows 8
- IIS 10.0 on Windows 10
Server - IIS 7.5 on Windows Server 2008 R2
- IIS 8.0 on Windows Server 2012
- IIS 8.5 on Windows Server 2012 R2
- IIS 10.0 on Windows Server 2016 Technical Preview
Product - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
Reference Microsoft.Web.FtpServer.dll