Web application cannot get TeeChart licence

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
MarkkuR
Newbie
Newbie
Posts: 3
Joined: Mon Jul 30, 2001 4:00 am

Web application cannot get TeeChart licence

Post by MarkkuR » Thu Apr 06, 2006 6:18 am

Hello!

We have installed few ASP.NET applications onto Windows 2003 server. Most of those web applications use TeeChart Pro, version 1.1.2004.16592. For some reason TeeChart cannot find it's licence and we get an error message

Code: Select all

[NullReferenceException: Object reference not set to an instance of an object.]
   Steema.TeeChart.FrAccessProvider.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions) +158
   System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey) +327
   System.ComponentModel.LicenseManager.ValidateInternal(Type type, Object instance, Boolean allowExceptions, License& license) +44
   System.ComponentModel.LicenseManager.Validate(Type type, Object instance) +32
   Steema.TeeChart.Chart..ctor() +89
   Steema.TeeChart.Web.WebChart..ctor() +117
aspx source looks like this:

Code: Select all

Line 13: 	<body MS_POSITIONING="GridLayout">
Line 14: 		<FORM id="Form1" method="post" runat="server">
Line 15: 			<tchart:WebChart id="WebChart1" style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 16px" runat="server"
Line 16: 				Width="704px" Height="408px" TempChart="File" AutoPostback="False"></tchart:WebChart></FORM>
Line 17: 	</body>
I have read Tutorial 17 - Designtime, Runtime and License Requirements and followed the instructions there.

1) I have removed current TeeChart component from my form, recompiled, removed licence.licx file and let my Visual Studio 2003 recreate it when I added TeeChart component again to the form.

2) Licences.licx looks like this: Steema.TeeChart.Web.WebChart, TeeChart, Version=1.1.2004.16592, Culture=neutral, PublicKeyToken=9c8126276c77bdb7

3) Licences.licx file is an embedded resource.

4) I have also modified registry entry [HKEY_LOCAL_MACHINE\SOFTWARE\Steema Software\TeeChart.NET]
"DesignKey"="Steema.TeeChart.TChart is a licensed component."
to:
"DesignKey"="xxSteema.TeeChart.TChart is a licensed component."

and I got an error "'path'\licenses.licx Could not transform licenses file 'licenses.licx' into a binary resource. (1) : error LC0004 : Exception occured creating type 'System.ComponentModel.LicenseException'" when I tried to recompile my application. This shows that Visual Studio is compiling the licence into my dll.

5) For some reason one of my applications which use TeeChart is getting its' licence correctly.

6) Applications are working fine on my development environment (Visual Basic .NET, Visual Studio 2003)

Have I possibly missed out something or done some wrong?
Any tips?

Best Regards
Markku

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 Apr 06, 2006 8:55 am

Hi Markku,

There is a licensing aspect that came to light that we weren't aware of in time for the documentation and that may help to know.

The issue relates to applications that compile TeeChart into a DLL that is then used in turn by a different application. Please note the comments from a TeeChart Developer who ran through runtime licensing steps:

"...
It was not enough to provide
the .licx entry in building the DLL that instantiates and uses TeeChart -
no! In fact, even though the main project (the EXE module) did not
reference TeeChart, apparently it was necessary to add the TeeChart
licensing entry to this project's own .licx file
..."

Please check that the point might not apply in your case. If that's not relevant or of help and the test below doesn't help either, please let us know what type of application TeeChart is being built into along with any other information you might feel is of use and we'll look for other causes of the problem.

Another test (assuming your application doesn't fall into the dll type described above), would be to recompile the TeeChart demo (assuming you ran the precompiled exe?) on your development machine and then test that on the runtime machine. That would confirm that the designtime license is correctly in place on your development machine and able to correctly 'compile-in' the license.

Please let us know if the above doesn't help resolve the issue

BTW: Notice that the latest TeeChart for .NET v1 release available at our Customer Download Area is Build 1.1.2259.29262.
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

MarkkuR
Newbie
Newbie
Posts: 3
Joined: Mon Jul 30, 2001 4:00 am

Post by MarkkuR » Thu Apr 06, 2006 10:33 am

Hi Narcis!

I'm afraid the case you referred doesn't apply in my case because my application is an ASP.NET Web application and it doesn't have any exe-file at all.

I compiled TeeChart demo (TeeChart Examples.csproj) which worked fine on both my computer and on the server where I'm trying to install these web applications.

My application consists of several aspx-files (pages): Default.aspx, banner.aspx, Conditions.aspx and Histogram.aspx. Default.aspx puts these other three aspx-pages together into a frame in order to form a complete web page. TeeChart is used in Histogram.aspx. All the visual basic code behind these aspx-files are compiled into a single dll (Histogram.dll - according to the project name).

The start page of the project is Default.aspx. The licences.licx file of the project refers to TeeChart, as mentioned earlier.

Some clips from my code:

Default.aspx

Code: Select all

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="default.aspx.vb" Inherits="Histogram.Default" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<TITLE>$$Histogram_caption$$</TITLE>
		<script>
		</script>
	</HEAD>
	<frameset border="0" frameSpacing="0" rows="35,180,*" frameBorder="0">
		<frame name="banner" scrolling="no" frameBorder="0" src="banner.aspx?<%=request.querystring%>" leftmargin="0" topmargin="0" marginheight="0" noResize>
		<FRAME name="middle" src="Conditions.aspx?<%= Request.QueryString%>" frameBorder="1" scrolling="auto">
		<FRAME name="bottom" src="Histogram.aspx?<%= Request.QueryString%>" frameBorder="1" scrolling="auto">
	</frameset>
</HTML>
Histogram.aspx

Code: Select all

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="Histogram.aspx.vb" Inherits="Histogram.Histogram" %>
<%@ Register TagPrefix="tchart" Namespace="Steema.TeeChart.Web" Assembly="TeeChart" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>WebForm1</title>
		<meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
		<meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<LINK href="Styles.css" type="text/css" rel="stylesheet">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<FORM id="Form1" method="post" runat="server">
			<tchart:webchart id="WebChart1" style="Z-INDEX: 109; LEFT: 9px; POSITION: absolute; TOP: 6px" runat="server"
				Width="728px" Height="565px" 
				AutoPostback="False" TempChart="Session"></tchart:webchart></FORM>
	</body>
</HTML>
And something from Histogram.aspx.vb

Code: Select all

Public Class Histogram
    Protected WebChart1 As Steema.TeeChart.Web.WebChart

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
.......
	WebChart1.Chart.Axes.Bottom.Labels.ValueFormat = "#.#"
        WebChart1.Chart.Axes.Bottom.Automatic = False
.......
    End Sub
Best Regards
Markku

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

Post by Marc » Thu Apr 06, 2006 2:50 pm

Hello Markku,

Please check:
- that the teechart.dll delivered with your application dll is the one that was used at compilation time.
- that there is no TeeChart.dll other than the version compiled with your project in the GAC. Can check from VS.NET command prompt with
gacutil /l teechart

- that no other TeeChart versions are referenced by the registry 'AssemblyFolders' key
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders]
Regards,
Marc Meumann
Steema Support

MarkkuR
Newbie
Newbie
Posts: 3
Joined: Mon Jul 30, 2001 4:00 am

Post by MarkkuR » Fri Apr 07, 2006 5:49 am

Good Morning!

The TeeChart.dll versions used at compilation time and with my application are identical.

This is strange: There's no TeeChart.dll in application cache:
C:\Documents and Settings\xxxx>gacutil /l teechart
Microsoft (R) .NET Global Assembly Cache Utility. Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
The Global Assembly Cache contains the following assemblies:
The cache of ngen files contains the following entries:
Number of items = 0
There is only one TeeChart referenced in the registry by 'AssemblyFolders' key (in the development environment):
C:\Program Files\Steema Software\TeeChart for .NET v1
With regards,
Markku

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

Post by Marc » Fri Apr 21, 2006 10:17 am

Hello Markku,

Sorry to keep you waiting for this reply.

TeeChart doesn't install to the GAC by default so it is not unusual to see no TeeChart entry in the GAC.

I'm not sure why your application is not picking up the license correctly. You could add the TeeChart.dll being used by your project to a general folder location and then add it to the GAC to be sure it is being accessed ("gacutil /i <path>\teechart.dll" adds TeeChart to the GAC).

If that doesn't help please send us your project or a sample project similar to it, that fails, plus the TeeChart.dll being used and we'll try to debug the problem.

(zipped project files may be sent to the news://www.steema.net/steema.public.attachments newsgroup)

Regards,
Marc
Steema Support

mweaver
Newbie
Newbie
Posts: 11
Joined: Wed Jun 22, 2005 4:00 am

Steema.TeeChart.FrAccessProvider.GetLicense

Post by mweaver » Thu Jul 12, 2007 2:45 am

I realize this is an old thread, but I have a similar issue with TeeChart for .NET v2.0.2546.16099.

I have an ASP.NET 2.0 web application that references a separate assembly that is compiled in C#. Within the assembly, I have code that instantiates TeeChart directly. I have embedded the license.licx into the separate assembly.

The application works fine on server A, which is Windows Server 2003 x64 with ONLY .NET v2.0 installed. On server B (which is Windows Server 2003 x32 with BOTH .NET v1.1 and .NET v2.0 installed), the Steema.TeeChart.FrAccessProvider.GetLicense fails.

I'm using the exact same code in both cases. I spent several hours trying everything I could think of, but to no avail. I finally had to run TeeRegV2 on server B to get the application to work correctly.

Could someone from Steema please provide guidance as to the proper way to embed the license in a ASP.NET web application?

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

Post by Marc » Thu Jul 12, 2007 11:13 am

Hello,

Is the project compilation done on the first of the 2 servers (Windows Server 2003 x64 with ONLY .NET v2.0)? If that is the case it may be working there as the designtime key is in place on that server.

The ASP.NET Web application (project) that calls the separate assembly should include licenses.licx as an embedded resource. That will require that the project have a reference to the separate assembly (assuming the separate assembly itself has a reference to TeeChart).

Please check too, that the ASP.NET share used for the application is using framework 2 (checkable via the IIS share properties).

Regards,
Marc Meumann
Steema Support

teeuser
Newbie
Newbie
Posts: 3
Joined: Tue Jan 17, 2006 12:00 am

Post by teeuser » Wed Mar 19, 2008 3:56 pm

Hi,

We have been getting the same error ([NullReferenceException: Object reference not set to an instance of an object.] ) since we renamed our project's assembly name. However, we only get this error on our production server, and not on the development server. We compile locally on our developer's machine (which have the developer's license key installed), and deploy to dev, and then prod.

We actually experienced this error on the dev machine initially, but we re-ran the key installer, re-compiled, and deployed to dev, and it worked. Doing the same thing didn't work with the deployment to production.

One thing I noticed is that the value of
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\TeeChart is
C:\Program Files\Steema Software\TeeChart for .NET v2

However, we actually include the TeeChart.dll version from a repository directory on a network drive. Would that cause a problem? (Though it would not explaion why the deployment to dev still works).

Thanks,
g

mweaver
Newbie
Newbie
Posts: 11
Joined: Wed Jun 22, 2005 4:00 am

Post by mweaver » Wed Mar 19, 2008 4:10 pm

I spent many hours on this problem and the only way to resolve it was to run the registration tool on the production server. It was then that I realized that Steema changed their license agreement. There is no longer any royalty-free server deployment. You have to pay for each and every server where you run TeeChart.

This is why we are moving away from TeeChart.

teeuser
Newbie
Newbie
Posts: 3
Joined: Tue Jan 17, 2006 12:00 am

Post by teeuser » Wed Mar 19, 2008 4:19 pm

that's unfortunate. :(

but thanks for your quick response.

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

Post by Marc » Sun Mar 23, 2008 8:08 am

Hello,

There may be a build issue here at the compile machine. The application should port correctly to the production server without need to install the developer license key.

The assembly name of the project should match the name you use when you compile it. Once recompiled with the new name and the licenses.licx TeeChart entry the application should contain the correct TeeChart runtime license for distribution.

I'm assuming TeeChart is referenced directly in the main application project. If the project is multi-tier, using TeeChart built-in to a reusable dll assembly, then please let us know and we'll advise on the best setup for the application.

With respect to licensing and royalties in answer to the previous post. A TeeChart Developer license includes one Developer server (non-production). Production servers require a WebServer Runtime license. Unit and volume pricing can be viewed at: http://www.steema.com/ordering/order_prices.html. Further volume and unlimited license pricing is available on request to sales@steema.com. The licensing model has has applied to all TeeChart versions for at least the last five years.

Regards,
Marc Meumann
Steema Support

teeuser
Newbie
Newbie
Posts: 3
Joined: Tue Jan 17, 2006 12:00 am

Post by teeuser » Wed Apr 23, 2008 1:59 pm

just an FYI.

we managed to fix the problem by removing a very old assembly that was no longer used but was never removed from production.

THoMaSiN
Newbie
Newbie
Posts: 36
Joined: Mon Apr 14, 2008 12:00 am

WebProject not reading well the license

Post by THoMaSiN » Tue May 20, 2008 7:09 pm

Hello,

I'm trying to deploy a project on a web server (that works perfectly on my development machine) and It's turning to be impossible to have the licensing work.

Is there any place where I can find a list of steps needed to do in order to properly get the license working on an ASP.NET environtment?

I'm trying to have it working via a dll, but giving the situation, just getting it working directly would be enough ...

I haven't been able to see the examples provided in the production either, same problem. even though it works perfectly at the development machine.

Please, I would need some more hints on this, I've read tutorial 17 and executed all the (somewhat not organized) steps.

Code: Select all

[LicenseException: 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.]
   System.ComponentModel.LicenseManager.Validate(Type type, Object instance) +2034260
   Steema.TeeChart.Chart..ctor() +119
   Steema.TeeChart.Web.WebChart..ctor() +78
   ASP.chart_styles_financial_renkochart_aspx.__BuildControlWebChart1() +29
   ASP.chart_styles_financial_renkochart_aspx.__BuildControlForm1() +105
   ASP.chart_styles_financial_renkochart_aspx.__BuildControlTree(chart_styles_financial_renkochart_aspx __ctrl) +52
   ASP.chart_styles_financial_renkochart_aspx.FrameworkInitialize() +34
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +38
   System.Web.UI.Page.ProcessRequest() +86
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.chart_styles_financial_renkochart_aspx.ProcessRequest(HttpContext context) +4
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

versions: 3.5.3061.15672

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

Post by Narcís » Wed May 21, 2008 8:05 am

Hi THoMaSiN,

If you already read tutorial 17, I'd recommend you to follow the steps described here.

If this doesn't help don't hesitate to let us know.

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

Post Reply