Installing a License

This article describes how to install any DotNetBrowser license, including Evaluation and Commercial licences.

You can obtain an evaluation license and start using your 30-day trial by filling in this web form.

If the license is missing, not valid or not installed properly, the following exception occurs:

Unable to find a valid DotNetBrowser License. Please make sure you have set up your license correctly. To do so, follow the instructions here: http://links.teamdev.com/dnb-setup-lic

This exception can be fixed by adding a proper license to your project using one of the ways:

  • Set the license key programmatically through the API.
  • Configure the license file (dotnetbrowser.license) as an Embedded Resource.
  • Copy the license file to the working directory of your .NET application.

Set the license key programmatically through the API

DotNetBrowser API allows to use separate keys for different IEngine instances:

IEngine engine = EngineFactory.Create(new EngineOptions.Builder
{
    LicenseKey = "your_license_key"
}
.Build());

This approach overrides the license key added as Embedded Resourse or copied to the working directory.

Configure a license file

Create a license file

The license file (dotnetbrowser.license) is a simple text file containing the license key. If you have a license key only and need to have the dotnetbrowser.license file, you can create this file in a text editor, such as Notepad or Notepad++, and insert your license key into this file.

Configure a license file as an Embedded Resource

In Solution Explorer, right-click your project, select Add > Existing Item… and add dotnetbrowser.license file:

Add Item

In Solution Explorer, right-click dotnetbrowser.license and select Properties. In the Properties panel which opens, select Embedded Resource as Build Action:

Properties

Copy the license file to the working directory of your .NET application

You can copy the dotnetbrowser.license file to the working directory of your .NET application. The process of adding the file is much similar the first approach described above. However, you need to specify the Build Action setting as None and Copy to Output Directory as Copy Always in the Properties section:

Working Directory

Adding a license file to the demo application

To launch DotNetBrowser demo application, add the dotnetbrowser.license file to a working directory next to DotNetBrowser.Wpf.Demo.exe and DotNetBrowser.WinForms.Demo.exe executables. To do so:

  1. Download DotNetBrowser 2.x distribution archive.
  2. Extract the archive into, for example, C:\Downloads\DotNetBrowser-2.x\ directory.
  3. Create the dotnetbrowser.license file in a text editor, such as Notepad or Notepad++. Insert your license key into this file.
  4. Navigate to the Library subfolder and copy/move the license file there:

DotNetBrowser Demo

Go Top