Collapse

Embedded reporting tools offline licensing overview

To license Bold Reports® Embedded Reporting tools offline from version 2.4.X, include the license key file ( .lic ) in your projects to use the Bold Reports® assemblies. Syncfusion® introduced this offline licensing system for Bold Reports® starting with version 2.4.X. The following licensing error appears if the license token is missing in your projects.

This application was built using a trial version of Bold Reports®. Please include a valid license to permanently remove this license validation message. You can also obtain a free 30 day evaluation license to temporarily remove this message during the evaluation period.

How do I generate and download a Bold Reports® offline license key?

You can generate the Bold Reports® license key file ( .lic ) from the Downloads & key/Claim License Key section of the Bold Reports® site.

Bold Reports® license key files ( .lic ) are version specific, so use the license key file ( .lic ) for the matching version in your projects.

How do I register the Bold Reports® offline license key?

To register the Bold Reports® offline license key, read the license key file ( .lic ) and call RegisterLicense with isOfflineValidation: true before any Bold Reports® control is initialized. The license key file contains a string. Use the following code to register the license.

string licenseKey = File.ReadAllText(licenseFilePath);
Bold.Licensing.BoldLicenseProvider.RegisterLicense(licenseKey, isOfflineValidation: true);

ASP. NET

Register the Bold Reports® offline license key in the Application_Start method of Global.asax.cs/Global.asax.

To register the license quickly in an ASP.NET application, watch the following video.

void Application_Start(object sender, EventArgs e)
{
    //Register Bold licenseKey
    string licenseKey = File.ReadAllText(Server.MapPath("boldreports_licensekey.lic")); // Replace it with actual license key file path
    BoldLicenseProvider.RegisterLicense(licenseKey, isOfflineValidation: true);
    // Code that runs on application startup
    RouteConfig.RegisterRoutes(RouteTable.Routes);
    BundleConfig.RegisterBundles(BundleTable.Bundles);
}

ASP. NET MVC

Register the Bold Reports® offline license key in the Application_Start method of Global.asax.cs.

To register the license quickly in an ASP.NET MVC application, watch the following video.

void Application_Start(object sender, EventArgs e)
{
    //Register Bold licenseKey
    string licenseKey = File.ReadAllText(Server.MapPath("boldreports_licensekey.lic")); // Replace it with actual license key file path
    BoldLicenseProvider.RegisterLicense(licenseKey, isOfflineValidation: true);
    // Code that runs on application startup
    RouteConfig.RegisterRoutes(RouteTable.Routes);
    BundleConfig.RegisterBundles(BundleTable.Bundles);
}

ASP. NET Core

Register the Bold Reports® offline license key in the Configure method of Startup.cs.

To register the license quickly in an ASP.NET Core application, watch the following video.

public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
    //Register Bold licenseKey
    string licenseKey = File.ReadAllText(@"boldreports_licensekey.lic"); // Replace it with actual license key file path
    BoldLicenseProvider.RegisterLicense(licenseKey, isOfflineValidation: true);
    loggerFactory.AddConsole(Configuration.GetSection("Logging"));
    loggerFactory.AddDebug();
}

WPF

Register the Bold Reports® offline license key in the App constructor of App.xaml.cs in C#. If the App constructor is not available in App.xaml.cs, create the App() constructor in App.xaml.cs and register the license key inside the constructor.

To register the license quickly in a WPF application, watch the following video.

public partial class App : Application
{
    public App()
    {
     //Register Bold licenseKey
     string licenseKey = File.ReadAllText(@"boldreports_licensekey.lic");  // Replace it with actual license key file path
     Bold.Licensing.BoldLicenseProvider.RegisterLicense(licenseKey, isOfflineValidation:true);
    }
}

UWP

Register the Bold Reports® offline license key in the App.xaml.cs constructor before InitializeComponent() in C#. If the App constructor is not available in App.xaml.cs, create the App() constructor in App.xaml.cs. Add the boldreports_licensekey.lic file as an embedded resource in the project and register the license key inside the constructor.

To register the license quickly in a UWP application, watch the following video.

public App()
{
    var assembly= typeof(App).GetTypeInfo().Assembly;
    var fileStream=assembly.GetManifestResourceStream("OfflineExport.boldreports_licensekey.lic");

    if (fileStream!= null && fileStream.Length >0)
    {
        using(var reader= new StreamReader(fileStream))
        {
            //Register Bold licenseKey
             string licenseKey = reader.ReadLineAsync().Result;
             BoldLicenseProvider.RegisterLicenseProvider.RegisterLicense(licenseKey, isOfflineValidation: true);
        }
    }
    this.InitializeComponent();
    this.Suspending += OnSuspending;
}

Blazor

For a Server side Blazor application, register the Bold Reports® offline license key in the Configure method of Startup.cs.

To register the license quickly in a Blazor application, watch the following video.

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
    //Register Bold licenseKey
    string licensekey = System.IO.File.ReadAllText(@"boldreports_licensekey.lic");// Replace it with actual license key file path
    Bold.Licensing.BoldLicenseProvider.RegisterLicense(licensekey, isOfflineValidation: true);
    if (env.IsDevelopment())
    {
        app.UseDeveloperExceptionPage();
    }
    else
    {
        app.UseExceptionHandler("/Error");
        // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
        app.UseHsts();
    }

    app.UseHttpsRedirection();
    app.UseStaticFiles();

    app.UseRouting();

    app.UseEndpoints(endpoints =>
    {
        endpoints.MapControllers();
        endpoints.MapBlazorHub();
        endpoints.MapFallbackToPage("/_Host");
    });
}

Frequently asked questions

Which Bold Reports® version supports offline license keys?

Bold Reports® supports offline license key files ( .lic ) starting with version 2.4.X.

Are Bold Reports® offline license key files version specific?

Yes. Bold Reports® license key files are version specific, so use the license key file for the matching version in your projects.

How do I register an offline license key instead of an online token?

Read the license key file and pass it to RegisterLicense with isOfflineValidation: true before any Bold Reports® control is initialized.