IIS 7.0: IFtpHomeDirectoryProvider Interface (Managed)
IIS 7.0: IFtpHomeDirectoryProvider Interface (Managed)

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

Public Interface IFtpHomeDirectoryProvider
Methods

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

IIS 7.0: IFtpHomeDirectoryProvider.GetUserHomeDirectoryData Method

Returns the physical path of the home directory for a user.

Example

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,
      IFtpHomeDirectoryProvider
   {
      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;
      }
   }
}
Requirements

Type

Description

Client

IIS 7.5

Server

IIS 7.5

Product

FTP 7.5

Reference

Microsoft.Web.FtpServer.dll

© 2010 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View