License.licx problem with dll called from Reporting Services

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Mark
Newbie
Newbie
Posts: 5
Joined: Fri Dec 16, 2005 12:00 am
Location: England

License.licx problem with dll called from Reporting Services

Post by Mark » Fri Aug 11, 2006 3:11 pm

I have a dll created using VS.Net 2003 which I call from Microsoft Reporting Services (2000). My dll uses a Steema.TeeChart.Chart object, after I upgraded to the latest version 2.0.2306.26231 it no longer works correctly. I believe this is due to the licensing which didn't exist in the previous version of TeeChart that I was using. The errors in the log file below:

Code: Select all

aspnet_wp!processing!d34!11/08/2006-16:00:15:: e ERROR: Failed to load expression host assembly. Details: Attempt to access the method failed.
System.MethodAccessException: Attempt to access the method failed.
   at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
   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 RSWebTrending.Chart..ctor()
I have followed the recommendations in Tutorial 17 but I can not get it to work. I have one question though, the tutorial says
it is necessary to add the TeeChart license lines to the Licenses.licx file of the final application
How is this possible when the dll is used by a final application like Reporting Services ?

Any help appreciated.

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Aug 14, 2006 8:06 am

Hello,

Have you tried testing the licensing functionality of TeeChart in simpler circumstances? You could try doing so by created a simply winform exe with a TeeChart in it following the instructions in Tutorial 17 to see if you can get it to work.

As far as using TeeChart within another dll, I think the idea is that your dll will have to ship with a licenses.licx file embedded in it with the TeeChart licensing information specified in the tutorial.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Mark
Newbie
Newbie
Posts: 5
Joined: Fri Dec 16, 2005 12:00 am
Location: England

Post by Mark » Mon Aug 14, 2006 10:02 am

Hi,

I have included the 3 lines in the Licenses.licx file as described in the tutorial and I have tested my dll outside of Reporting Services by simply using it in a aspx webform. In this situation it works correctly, I have even changed the registry key DesignKeyV2 value to correctly test the runtime situation.

The dll also works ok when I call it from the Reporting Services IDE, its only at runtime it doesn't work, however I'm guessing its something to do with the licensing as the previous version I used worked ok and that didn't implement it, plus the exception that is raised seems to indicate that its related to the licensing.

Any suggestions on what else I can try to get around this ?

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Aug 14, 2006 3:18 pm

Hello Mark,

Difficult one. If licensing works ok for you in an environment other than MS Reporting Services 2000 then this would suggest that there's nothing instrinsically wrong with the TeeChart licensing otherwise it wouldn't work anywhere.

Does your assembly create a chart at designtime or does this only happen at runtime? The problem would be even stranger if the licensing was to work at designtime and not runtime.

Is there any way you can create a simple example which I can run 'as-is' here to reproduce the issue?
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Mark
Newbie
Newbie
Posts: 5
Joined: Fri Dec 16, 2005 12:00 am
Location: England

Post by Mark » Mon Aug 14, 2006 3:36 pm

Hi Chris,
Thanks for getting back to me. I suspect the problem lays with Reporting Services and the way it "loads" my assembly rather than something intrinsic to TeeChart.

My assembly doesn't contain any code to differentiate between runtime and designtime, the Reporting Services IDE which is part of VS 2003 will call my dll and everthing works ok in its preview window, however this runs in a very different context to the runtime reportserver, where the problem occurs.

If you have RS installed I could send you a simple example so you could try and reproduce the problem. I am using SQL Server 2000 version with RS SP2 installed. Let me know and I will put together the example with some instructions.

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Mon Aug 14, 2006 3:55 pm

Hello Mark,

You're very welcome.

If you think I'll successfully be able to debug the teechart source on the report runtime server then yes, by all means send me an example (chris at steema dot com) and when I have some time I'll have a go.
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply