How to write an extension

A CompleteFTP Extension is a .NET assembly, usually a DLL, that contains a class that extends the one of the CompleteFTP extension base-classes (see specific extension topic). The assembly can be developed in C#, VB.NET or any other .NET language. If you don't already have Visual Studio then you can use one of Microsoft's free Visual Studio Express products (e.g. Visual C# or Visual Basic).

Creating an extension

To create a CompleteFTP extension:

  1. Open Visual Studio, Visual C# Express or Visual Basic Express.
  2. Create a new project of type Class Library.
  3. Add a reference to the CompleteFTPServer.dll. You can find this in the directory C:\Program Files\CompleteFTP\Server. If you are on a 64-bit machine then it will be in C:\Program Files (x86)\CompleteFTP\Server.
  4. Added references (using or import) to the namespaces required for your type of extension.
  5. Make sure your new class extends the appropriate base-class.
  6. Override the appropriate methods.
  7. Add any logging you require.
  8. Build the project.

Registering an Extension in CompleteFTP

Extensions must be registered with CompleteFTP. To do this:

  1. Open CompleteFTP Manager
  2. Select the Extensions panel
  3. Click 'Add extension'
  4. In the new row enter the Name of the extension; select the Extension Type; enter the full path to the DLL in the Assembly Path field; enter the name of your adapter class, including its namespace; and (optionally) the name of the editor class, including the namespace. Note that the assembly is read by the System user, so this user must have access to the file.
  5. Some extension types require you to perform an additional registration step, such as adding a new folder-type or granting permissions to site-commands.
  6. Click the Apply button
  7. Test your authenticator by connecting from a client.

Reloading an Extension in CompleteFTP

Extensions cannot be automatically reloaded if they are altered. If you need to make a change to the code of the extension then you will need to restart the CompleteFTP service to force it to reload the DLL.

For details on the type of extension that you are developing please go to: