Thank you for your purchase.

The following tutorial will help you configure your application correctly and put the license file in appropriate place.

License file ("FtpLicense.xml" you received after purchase via email or download link) is loaded from the run folder of your application (AppDomain.CurrentDomain.BaseDirectory).

Configuring license file in Visual Studio

In Visual Studio 2005, 2008, 2010, 2012, 2013, 2015, 2017, 2019, 2022 you can configure "FtpLicense.xml" file in your project, so it's always copied to your output directory:

  1. Right click on your project in Visual Studio in Solution Explorer.
  2. Click "Add" then "Existing item..."
  3. In "Files of type:" combo choose "All Files (*.*)".
  4. Browse to "FtpLicense.xml" file and click "Add" button.
  5. Right click on "FtpLicense.xml" file in Solution Explorer and click "Properties".
  6. On Properties pane change "Copy to Output Directory" option to "Copy if newer", and "Build Action" to "Content".

Copy license to output folder

.NET and .NET Standard/.NET Core

"FtpLicense.xml" should be in the run folder of your application. By default it is the folder your application's .exe file resides.

ASP.NET and WebServices

"FtpLicense.xml" should be in the root folder of your web application (the folder with the "web.config" file).

Windows Services

"FtpLicense.xml" should be in the run folder of your windows service. By default it is the folder your service's .exe file resides.

Please use the LicenseHelper described below to check the exact path.

Azure Functions

License file is loaded from the "bin" folder. Consider adding post-build step that copies the license file to the "bin" folder.

Getting exact path

You may use LicenseHelper class to obtain exact path from which the license is loaded:

Security

Remember also that your application needs to have read access to this file. It is especially important when, for example, you are developing WindowsService that runs on specific Windows account. Please make sure that the user in context of which the service is running has enough permissions to access to this file.

Library uses following code to assert that it has permissions to read the file:

Checking license status

License file is read once per application-run, so remember to restart your application after placing the file in appropriate folder.

You can use LicenseHelper class to obtain the exact path, and the current status of the license:

Machine key store

In rare cases when you use impersonation you'll need to put the following line in your application start up code (e.g. in Global.asax in Application_Start method). It tells .NET runtime to persist keys in the computer's key store instead of the user profile store.

ClickOnce

First configure the license file so it's copied to the output directory as described above.

  1. Right click on your project in Visual Studio in Solution Explorer.
  2. Select "Properties"
  3. Go to "Publish" tab
  4. Click "Application files..."
  5. Configure "FtpLicense.xml" file
  6. Set "Publish Status" to: "Include"
  7. Set "Download Group" to "Required"

ClickOnce license file deployment

Next steps