SetDeplymentKey failed

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
coldsun1982
Posts: 12
Joined: Thu Feb 28, 2019 1:57 am

SetDeplymentKey failed

Post by coldsun1982 » Mon May 20, 2019 3:05 am

Hi, I used "LightningChartUltimate.SetDeploymentKey(deploymentKey);" to publish my application in one PC, this PC owns legal copy, I get the key accordint to click "Copy deplyment key to" in Arction components liscense manager. Afer building this project, I copy the release of the project to another PC, and run .exe, the chart tell me "Deployment key doesn't allow Visual Studio designer use". I found only "Arction.Wpf.Charting.LightningChartUltimate.dll" in the release folder, Do I need to copy Arction.Licensing.dll and ohter .dll files to this folder? If it is not the reason, please tell me how to operate correctlly?

Code: Select all

InitializeComponent();
string deploymentKey ="XXXXXXX";
LightningChartUltimate.SetDeploymentKey(deploymentKey);
Attachments
微信图片_20190520110409.png
微信图片_20190520110409.png (4.17 KiB) Viewed 8511 times

ArctionKestutis
Posts: 552
Joined: Mon Mar 14, 2016 9:22 am

Re: SetDeplymentKey failed

Post by ArctionKestutis » Mon May 20, 2019 9:14 am

Hi,

There are two conditions when this messages is shown.
The first condition for this message to appear is no ‘Developer license’ from the machine and application has valid Deployment Key. If LightningChart detects that it is used in Designer, then it drops chart rendering and shows only message as user described. That is intentional limitation (i.e. if user deploys application, LightningChart should not and could not be used in Designer).
The second condition is testing deployed application usage in Designer indirectly. We are checking that Chart may be accessed not from Main UI Thread. Therefore, the message "Deployment key doesn't allow Visual Studio designer use" may be shown when Chart update was thread unsafe (i.e. update not in Main UI Thread). As for the most UI controls, LightningChart should be updated in the Main Thread. Even if user is not using Designer, the tread problem should be fixed (in user's code). LightningChart requires that all the Chart properties should be updated in Main UI Thread (or at least last Chart.EndUpdate() called in UI Thread). When using a background thread in the application, all UI updates from the thread must go through Invoke (Control.Invoke() in WinForms, and Dispatcher.Invoke() in WPF). If chart is not updated in Main Thread user may get very random and unexpected results (including crashes and access violation).

Hope this helps.

coldsun1982
Posts: 12
Joined: Thu Feb 28, 2019 1:57 am

Re: SetDeplymentKey failed

Post by coldsun1982 » Mon May 20, 2019 11:24 am

Hi, if it is the first condition, how to get ‘Developer license’? according to click "Copy deplyment key to" in Arction components liscense manager?

ArctionKestutis
Posts: 552
Joined: Mon Mar 14, 2016 9:22 am

Re: SetDeplymentKey failed

Post by ArctionKestutis » Tue May 21, 2019 9:16 am

Hi,

To develop application with LightningChart you need a 'developer license'. That is *.ALF file you got from Arction, which is added in License Manager. The 'developer license' allows charting developer to use and see LightningChart component without any restriction in Visual Studio environment.
After you completed your project/application, you would need to deploy app. To be able to run LightningChart applications in computers the software is deployed into, a Deployment Key has to be applied in code. Deployment Key can be extracted from a license key by pressing Copy deployment key to Clipboard button. In code, use static SetDeploymentKey methods for the components. Call the SetDeploymentKey methods somewhere before the components need to be used.
More details in User's Manual chapter 3. If you need more technical details please write to Arction's Support account directly.

Hope this helps.
All the best.

Post Reply