Page 1 of 1

Licensing fails during first run of application

Posted: Wed Sep 26, 2007 10:01 am
by 9641172
Hello,

I'm using TeeChart version 2.0.2652.22325.

I have implemented an application that uses .NET Remoting to provide a report generating service. A separate UI application connects and triggers report generation. A generated report can contain a TeeChart graph (as a .png file).

The report generating service runs on a machine that has no TeeChart installed.
The problem is that after installing the report generating service on a clean PC, constructing the TeeChart object fails with a NullReferenceException, with a stack trace that hints at a licensing problem.

Now to the weird part: When I restart the report generating service after the TeeChart constructor has failed, the TeeChart constructor runs without problems. This means that the TeeChart license is correctly built into the executable, right?

Can you give me a hint how to solve this problem?

Some additional information:
The report generating service references an assembly that uses TeeChart. Both projects (both .exe and .dll) embed a licenses.licx file that contains the correct TeeChart version.
On the build machine, this TeeChart version is installed.

Cheers,
Michael

Posted: Wed Sep 26, 2007 12:04 pm
by Marc
Hello Michael,

I've no quick explanation here, just a few questions for the moment:

Re. Stack trace
You mention that the problem is reported as a license error. I assume the error stack trace is similar to below:
=========
System.NullReferenceException: Object reference not set to an instance of an object.
at Steema.TeeChart.FrAccessProvider.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)
at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)
at System.ComponentModel.LicenseManager.ValidateInternal(Type type, Object instance, Boolean allowExceptions, License& license)
at System.ComponentModel.LicenseManager.Validate(Type type, Object instance)
at Steema.TeeChart.Chart..ctor()
=========

-Are you creating a Chart from the Chart class (non-visible) or via a form based TChart?
-Are you able to run a test client on the same system as the service to limit all calls to one machine and thus just check that there's no across-machine security aspect to the problem?
-You mention that after initial failure the Chart runs correctly when restarted, that is true for all subsequent access (ie. keeps running)?

With thanks.
Regards,
Marc Meumann

Posted: Wed Sep 26, 2007 12:29 pm
by 9641172
Hello Marc,

yes, the stack trace is the same as you provided.

The TeeChart is not displayed as a Control on a Form, I just use the TeeChart.Export.Image.PNG property to get an image file.

Both the client and the server run on the same machine.

Yes, a restart of the service after a failure "repairs" the license for good.
Restarting the service before the report generation has failed at least once, does not help.

Thanks for your quick response.

Regards,
Michael

Posted: Fri Sep 28, 2007 11:00 am
by Marc
Hello Michael,

We're not sure what may be happening. We'll need to run tests here to mimick the project setup. Do you have a simple solution/project template or setup instructions that you could send us to help us reproduce your application more easily?

You can post files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page, http://www.steema.net/upload/.

With thanks.
Regards,
Marc

Licensing fails during first run of application

Posted: Mon Oct 15, 2007 11:10 am
by 9641173
Hi,

as Michael is on vacation currently I wanted to let you know that the issue with the failing license has been fixed. There was no problem with the TeeChart licensing at all; we used another dll that had broken the license context of our application. Sorry, for bothering you with that problem and thanks for your fast answer and help. So you can actually close this topic.

Best regards,
Sonja