Page 1 of 1

TeeChart License not working when compressing application

Posted: Tue Jan 10, 2023 10:05 am
by 16573478
Hi,
We are new to using TeeChart .NET and have the component on several forms which are compiled into a .Net DLL. We have it working without showing the evaluation message when running the application in debug or release. The TeeCart.License file is included as an Embedded Resource as per the instructions for using the license file in both the dll and the main exe.

When we come to distribute our application, we use Netz to compress the application and several DLLs, including the ones containing the forms with TeeChart .NET component, into the main executable. But when we run the application the TeeChart control now shows the evaluation notice.

Any help gratefully received.
Regards,
Sean

Re: TeeChart License not working when compressing application

Posted: Wed Jan 11, 2023 10:14 am
by Christopher
Hello Sean,

is this the Netz you mean here?
https://madebits.github.io/#r/msnet-netz-compressor.md

If so, then I'm not sure how we can help as we have no experience using this application. I read here that:
By default .NETZ supports compression using #ZipLib or .NET 2.0’s IO.Compression.DeflateStream. Additional compression providers can be created if necessary. Theoretically new compression providers can also include encryption, but no such providers are included out of the box.
Which is important, as the licenses file is encrypted and TeeChart uses encryption algorithms to read it—could this be the reason why you are experiencing this problem?

Re: TeeChart License not working when compressing application

Posted: Thu Jan 12, 2023 12:22 pm
by 16573478
Hi Christopher,

Yes, we are using .NetZ you've indicated but it does not use any encryption.

We do not have a problem with any other embedded resources using this compression tool, so why can't TeeChart read the license from the decompressed embedded resources at runtime?

Is there any other way to package the license at runtime?

regards,
Sean

Re: TeeChart License not working when compressing application

Posted: Thu Jan 12, 2023 12:49 pm
by Christopher
Hello Sean,
Sean P wrote:
Thu Jan 12, 2023 12:22 pm
Is there any other way to package the license at runtime?
yes, yes there is, you don't have to embed the license. As long as the license is in the same directory as the TeeChart.dll then it should work—for example, a simple project built in Release with the license set to 'Copy always':
Screenshot from 2023-01-12 13-46-18.png
Screenshot from 2023-01-12 13-46-18.png (33.71 KiB) Viewed 4082 times
If we then double-click on the exe, the watermark disappears:
Screenshot from 2023-01-12 13-45-45.png
Screenshot from 2023-01-12 13-45-45.png (84.35 KiB) Viewed 4082 times

Re: TeeChart License not working when compressing application

Posted: Thu Jan 12, 2023 12:59 pm
by 16573478
Hi Christopher,

I thought we weren't allowed to distribute the TeeChart.Licenses file?
Can you confirm if this is not the case and we can distribute the file with the application?

Regards,
Sean

Re: TeeChart License not working when compressing application

Posted: Mon Jan 16, 2023 8:39 am
by Christopher
Hi Sean,

distributing the file is not contrary to our licensing agreement, as TeeChart.dll requires a valid TeeChart.licenses file to be distributed with it in order to remove the watermark. Usually the licenses file is distributed as an embedded resource within the exe binary, but even so it is transparent and can be easily read by reflection.

The question is: does moving the licenses file outside the exe binary as a non-embedded file resolve your issue?

Re: TeeChart License not working when compressing application

Posted: Mon Jan 16, 2023 10:41 am
by 16573478
Hi Christopher,

Yes, using the license file in the same folder as TeeChart.dll resolves the issue.

Thanks for your help.
Regards,
Sean.