Runtime licensing error

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
atlastech
Newbie
Newbie
Posts: 1
Joined: Fri Jan 19, 2007 12:00 am

Runtime licensing error

Post by atlastech » Thu Mar 03, 2011 10:43 pm

I am using TeeChart 2.0.2670.26520 in my C# application. Developing in a Windows XP VM with Visual Studio 2008.

I have my charting functionality in the Reporting component of the Visual Studio 2008 solution. It is referenced in the Reporting project and there is a license.licx file present in the Properties subfolder of this project. The license.licx contains...

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

The reporting DLL generated by the Reporting project is referenced by the main GUI project. This is the application EXE.

When I run the application in a test deployment VM (both WinXP and 64-bit Win7) and try to use any of the report charting functionality I get...

Code: Select all

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()
   at Steema.TeeChart.TChart..ctor()
   at AtlasTechnology.HarvestScheduler.Reporting.ProductionChart.InitializeComponent()
   at AtlasTechnology.HarvestScheduler.Reporting.ProductionChart..ctor(IScenario scenario)
   at AtlasTechnology.HarvestScheduler.GUI.Main.toolsMenuItem_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I managed to fix this error by referencing TeeChart and creating an entry in the license.licx in the GUI project. I'm a little unclear why I should need to do this since I'm not using TeeChart directly in the GUI project. I'm using it via the Reporting DLL. In the development VM this does not occur - it runs ok. It only occurs in the test deployment VMs.

Could anyone help explain this please?

Thanks,

John.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Runtime licensing error

Post by Sandra » Fri Mar 04, 2011 11:55 am

Hello John,

I couldn't reproduce your problem here with last version 2 of TeeChart.Net and VM. I recommend that you update your version 2 to last that you can find in custom download page and check again if your problem persist. Moreover, I suggest you, change target framework of your project to 2.0 if you use version 2 in VS2008. If after all, the problem still appears please, send us your project, so we can reproduce exactly problem here.

Thanks,
Best Regards,
Sandra Pazos / 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

atlastech
Newbie
Newbie
Posts: 1
Joined: Fri Nov 15, 2002 12:00 am

Re: Runtime licensing error

Post by atlastech » Sun Mar 06, 2011 7:53 pm

HI Sandra,

I think I came across something...

According to Tutorial 17 ...
Using TeeChart in a dll
If you have successfully compiled TeeChart with license into a dll, please note that if you then use that dll in another application you need to be sure to add the TeeChart license lines to the Licenses.licx file of the final application even though that application may not itself have a direct reference to TeeChart. If your end-user application is not developed in Visual Studio .NET then the license file and license itself should not be necessary at the point of final compilation.
Seems odd but it sounds like I need to embed a license.licx in the application as well, even though it's not using TeeChart directly.

Thanks for your help anyway.

John.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Runtime licensing error

Post by Sandra » Mon Mar 07, 2011 11:23 am

Hello John,

I am glad that you can find a solution for your problem.

Thanks,
Best Regards,
Sandra Pazos / 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

Post Reply