License could not be granted

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
jmb614
Newbie
Newbie
Posts: 6
Joined: Fri Apr 17, 2009 12:00 am

License could not be granted

Post by jmb614 » Thu May 21, 2009 1:38 pm

I compiled and deployed my first application using TeeChart. I got the error message below:

An instance of type 'Steema.TeeChart.Chart' was being created, and a valid license could not be granted for the type 'Steema.TeeChart.Chart'. Please, contact the manufacturer of the component for more information.

I verified that Licenses.licx contains a reference to Steema.TeeChart.TChart, TeeChart, Version=3.5.3371.26406 and Licenses.licx is an embedded resource.

Can you help?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu May 21, 2009 1:40 pm

Hi jmb614,

Could you please read this thread about the same licensing issue?

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

jmb614
Newbie
Newbie
Posts: 6
Joined: Fri Apr 17, 2009 12:00 am

Post by jmb614 » Thu May 21, 2009 2:43 pm

FYI, My app isn't a web app, it's a windows form app.

I read the thread, did the reg hack and tried to recompile and I got the error about not having a valid license. I undid the reg hacks.

My licenses.licx file only had

Steema.TeeChart.TChart, TeeChart, Version=3.5.3371.26406, Culture=neutral, PublicKeyToken=9c8126276c77bdb7

So I added

Steema.TeeChart.Chart, TeeChart

I recompiled successfully, but when deployed to the client I still get a license error.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu May 21, 2009 2:57 pm

Hi jmb614,

Have you checked that licenses.licx is compiled as an embedded resource in your project, as mentioned in tutorial 17?

You could also try checking machine's AssemblyFolder's TeeChart settings as described here.

Finally, notice that yesterday a new maintenance release was posted at the client area. You may want to uninstall your current version and install the new one. Maybe the installer helps setting up your environment correctly.

If this doesn't help don't hesitate to let us know.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

jmb614
Newbie
Newbie
Posts: 6
Joined: Fri Apr 17, 2009 12:00 am

Post by jmb614 » Thu May 21, 2009 5:37 pm

I uninstalled and reinstalled TeeChart with the new maintaince release. I got 3 errors on both, TeeGofer Help 2 stopped, Registration Utility stopped, and TextBox Editor stopped. In the reverse order on install.

I am running Vista 64bit. I rebooted after the install per dialog, and then ran TeeRegV3 (Run as Administrator) and it returned key installed successfully.

Ran app in debug mode, no problem. Compiled as Release, deployed to client and the same problem exists.

Can you help?

Marc
Site Admin
Site Admin
Posts: 1266
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Fri May 22, 2009 8:59 am

Hello,

Is your application a desktop executable application or does it take a different format?

If you make a new winform application and drag a Chart from the toolpalette to the form and compile, without taking any further steps, does that application run on your client machine?

With thanks.
Regards,
Marc Meumann
Steema Support

jmb614
Newbie
Newbie
Posts: 6
Joined: Fri Apr 17, 2009 12:00 am

Post by jmb614 » Fri May 22, 2009 11:49 am

Yes, it installs and runs with just a teechart from the toolbox.

jmb614
Newbie
Newbie
Posts: 6
Joined: Fri Apr 17, 2009 12:00 am

Post by jmb614 » Fri May 22, 2009 2:04 pm

This is getting really frustrating.

I upgraded to the latest maintenance release, I have confirmed that all references and the chart itself point the current 3.5.3425.20245 release. I have the following two lines in my licenses.licx:

Steema.TeeChart.TChart, TeeChart, Version=3.5.3425.20245, Culture=neutral, PublicKeyToken=9c8126276c77bdb7
Steema.TeeChart.Chart, TeeChart, Version=3.5.3425.20245, Culture=neutral, PublicKeyToken=9c8126276c77bdb7

The licenses.licx is an embedded resource.

The correct DLL is being installed on the client. What gives?

Marc
Site Admin
Site Admin
Posts: 1266
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Fri May 22, 2009 3:23 pm

Hello,

If the basic-Form-with-TChart application checks out ok it suggests that basic license setup on your development m/c is ok. Steps here would be to compare the basic application with your own. For example:

- the licenses.licx entry, you could copy it from the basic application to your own. The Windows Form app will have used TChart, hence will have a line for "Steema.TeeChart.TChart, TeeChart". Check the version number coincides and repeat the line for Chart (as you have done in your example ... only required if you are constructing 'Chart' by code).

- Check that the teechart.dll loaded into the bin folder of the basic application is the same as that loaded to the folder of your application

- Still pending and may influence behaviour, is whether your application a desktop executable application (similar to the winform app) or does it take a different format?

With thanks.
Regards,
Marc
Steema Support

jmb614
Newbie
Newbie
Posts: 6
Joined: Fri Apr 17, 2009 12:00 am

Post by jmb614 » Fri May 22, 2009 7:52 pm

My application is a Windows Form application. The graph is on a UserControl and I do create graphs at runtime too, but the application never got to that code before I saw the reported errors.

The UserControl project has the correct TChart reference in the licenses.licx The TChart on the control is the same version as the licenses.licx reference.

I added a form to the startup project and put a TeeChart on that form. It added the TChart reference to the startup projects licenses.licx, same as UserControl.

With that dummy form, the project now deploys to the client. Never seen such a issue before with all the other controls I've worked with to date.

Marc
Site Admin
Site Admin
Posts: 1266
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Mon May 25, 2009 7:54 am

Hello,

The explanation is that there was no TeeChart licenses.licx file entry at the application level before it was automatically generated when you added the (dummy) Chart to the form.

License checks are made at the highest assembly level, in this case the WinApp that loads the UserControl. TeeChart must have a licenses.licx entry at that level. There is an exception to that rule, but only if your top level assembly doesn't directly need to know of or call TeeChart methods (directly or wrapped). In that case you could use the 'plugin' Chart constructor overload approach discussed here:

http://www.teechart.net/support/viewtopic.php?t=9662

Regards,
Marc
Steema Support

Post Reply