Jump to content
Software FX Community

ChartFX.Lite LicenseException


Bruce Martin

Recommended Posts

I have an application built with VB2005 that runs correctly when started by direct invocation, but has a ChartFX.Lite LicenseException problem when invoked by double clicking the associated data file. The application is installed as Registration-Free COM, deployed with a simple deployment model such as XCOPY. The installation folder has three files:

Forecaster3.exe (my app)

ChartFX.Lite.dll (Version: 6.0.1551.24517 - Updated: 31/3/2004)

Interop.Excel.dll

It works just fine when Forecaster3 is started the normal way. Why is there an Exception only when Forecaster3 is started by association and not by direct invocation? How can I fix this?

My Exception report is shown below:

07-15-2007  09:38:57

Environment Information

*********************************************

Microsoft Windows NT 5.0.2195 Service Pack 4, Win32NT, Win2000, 5.0.2195.262144

Forecaster3 - Version 3.0.53.8, 7/15/2007 9:38:56 AM

1) Exception Information

*********************************************

Exception Type: System.ComponentModel.LicenseException

LicensedType: SoftwareFX.ChartFX.Lite.Chart

Message: Couldn't get Run Time license for 'SoftwareFX.ChartFX.Lite.Chart'

Data: System.Collections.ListDictionaryInternal

TargetSite: SoftwareFX.ChartFX.Lite.Base.13 I3(System.ComponentModel.LicenseContext, System.Type, System.Object, Boolean, System.ComponentModel.LicenseProvider)

HelpLink: NULL

Source: ChartFX.Lite

StackTrace Information

*********************************************

at SoftwareFX.ChartFX.Lite.Base.12.I3(LicenseContext 1I2, Type 1I3, Object 1I4, Boolean 1I5, LicenseProvider 1I6)

at SoftwareFX.ChartFX.Lite.Base.RegistryLicenseProvider.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 SoftwareFX.ChartFX.Lite.Chart..ctor()

at Forecaster3.FormDisplay.InitializeComponent()

at Forecaster3.FormDisplay..ctor()

at Forecaster3.DisplayManager.OpenOneCalculationDisplay(PlanItem Object1)

at Forecaster3.DisplayManager.OpenDisplays(PlanItem Collection1)

at Forecaster3.DisplayManager.OpenAllCalculationDisplays(FormMDI myMIDIparent, ToolStripMenuItem TheWindowsMenu)

 =========================================

Link to comment
Share on other sites

Here's some more information about my problem, as stated above.

After reading some of the other posts here, I have determined that I already have a licenses.licx file in my project, and it has this single line:

SoftwareFX.ChartFX.Lite.Chart, ChartFX.Lite, Version=6.0.839.0, Culture=neutral, PublicKeyToken=a1878e2052c08dce

Does anyone have an idea of what I should do? This problem exists on a client's computer which is not close to me, so I have to send him expermental solutions to see what works.

Link to comment
Share on other sites

Yes, reflector shows that the correct licx info is part of the EXE. And the program executes correctly when started by direct invocation. It only fails when started by double-clicking the associated data file. You can see from the exception report's stack trace that the app started, but when it tried to create a chart, it failed.

Link to comment
Share on other sites

> It only fails when started by double-clicking the associated data file.

What is this doing? Is this running the EXE with some parameter or is this loading some kind of dll instead of the EXE?

What's the name of the EXE? Is the EXE code in the stack?

Link to comment
Share on other sites

Double-clicking the associated data file to start an application program is a function provided by the OS. The path of the data file is passed as a parameter in the command line.

The EXE is Forecaster3 (my app). The atack trace shows that it is running. It has read the data file and is trying to call ChartFX.Lite to create a chart on a Windows form.

As seen in the stack trace, the call is from an application form "FormDisplay" to the funcion "InitializeComponent" which is a procedure in the required code placed in the Windows Form Designer by VB2005. This code contains the line:

  Me.Chart1 = New SoftwareFX.ChartFX.Lite.Chart

 

And this is where the problem shows up.

Link to comment
Share on other sites

> Double-clicking the associated data file to start an application program is a function provided by the OS. The path of the data file is

> passed as a parameter in the command line.

I don't understand how this can make any difference on how Chart FX will work. The reason I asked is because I didn't know whether this was the case or your file was a compound document that had a OLE object embedded in it and this object was the one using Chart FX.

So at this point I have no clue on why this is happening. I am going to need for you to attach a sample project that reproduces the problem in order to determine what's causing it. I have been unable to reproduce it on my end.

 

Link to comment
Share on other sites

Well I can't reproduce the problem here either. I don't have a system here that is a typical user system. one without ChartFX Lite installed already as part of a development environment.

My user has two machines, one is XP, another Win2K, both with the very latest service packs and up-to-the-minute MS's updates. Both result in exactly the same exception that I posted to you.

The application data file is simple text file, without any embedded objects.

The only thing I can suggest is that you download my program and then see if you have the same problem. You can download from http://www.retirementforecaster.com/.

Install on a clean machine (.Net 2.0 is needed), and then associate the .FRC files with Forecaster3.exe. Double click any of the example files that are included in the installation under My Documents/Forecaster3 Examples. Note: the ChartFX Lite object is not called until the "Calculate" button is clicked.

If you have the same exception, then I'll work on creating a small subset of the project that I can send to you for testing.

Link to comment
Share on other sites

Frank,

I have prepared a small test program that exhibits the same problem on my user's computer. When he starts the test program by double clicking the data file, there is this error: Couldn't get Run Time license for 'SoftwareFX.ChartFX.Lite.Chart'. Starting the program normally does not cause this problem.

Go to http://www.retirementforecaster.com/charttest.zip to download the test material. The source is all in the folder named "ChartTest". The three files at the top level are the test configuration. Move these three files all together into a single folder on a machine with Net2. Now manually associate the "zzz" extension data file "spyquotes.zzz" with the ChartTest.exe program. Now double click the " spyquotes.zzz" file. What happens?

My user gets this report, as generated from the ChartTest.exe exception reporting function.

====================================

07-29-2007  22:41:06

Environment Information

*********************************************

Microsoft Windows NT 5.0.2195 Service Pack 4, Win32NT, Win2000, 5.0.2195.262144

ChartTest - Version 1.0.0.0, 7/29/2007 10:41:06 PM

Exception Information

*********************************************

Exception Type: System.ComponentModel.LicenseException

LicensedType: SoftwareFX.ChartFX.Lite.Chart

Message: Couldn't get Run Time license for 'SoftwareFX.ChartFX.Lite.Chart'

Data: System.Collections.ListDictionaryInternal

TargetSite: SoftwareFX.ChartFX.Lite.Base.13 I3(System.ComponentModel.LicenseContext, System.Type, System.Object, Boolean, System.ComponentModel.LicenseProvider)

HelpLink: NULL

Source: ChartFX.Lite

StackTrace Information

*********************************************

at SoftwareFX.ChartFX.Lite.Base.12.I3(LicenseContext 1I2, Type 1I3, Object 1I4, Boolean 1I5, LicenseProvider 1I6)

at SoftwareFX.ChartFX.Lite.Base.RegistryLicenseProvider.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 SoftwareFX.ChartFX.Lite.Chart..ctor()

at ChartTest.Form2.InitializeComponent()

at ChartTest.Form2..ctor()

==============================

Thanks for your help with this.

Bruce

Link to comment
Share on other sites

I ran this program in a clean Windows XP machine with the .NET Framework 2.0 installed and the app runs fine both when I run it directly or when I select the file, select Open and then select your program.

Are you associating the file in a different way? Are you running this app locally of from a network drive?

Link to comment
Share on other sites

I passed your reply on to my user (who also has a copy of ChartTest). His reply was:

"Hmm, I used "Associate with" dialog in my shareware file manager called Total Commander. I tried deleting current .zzz association, and using Open dialog to create another one. It worked. Now the chart shows if I double click on .zzz file."

So it looks to me that if you are interested in exploring this funny incompatibility between ChartFx and Total Commander then you could download Total Commander and associate the zzz file using it, then double click the zzz data file.

Link to comment
Share on other sites

Here is another report from my user. He is working with the original application: FC (Forecaster3). But his experiments and findings may give you some help in figuring out the problem.

Note that his reference to Calculate refers to initiating a FC program action that opens chart windows that use ChartFX.Lite to display graphs of calculation results. It seems that without the [ext]_auto_file registry entry, the application will start with a double click on the data file, but the ChartFX license exception happens. But if the [ext]_auto_file registry entry is corrected, then the exception goes away. Weird indeed.

His report follows:

"Just spent another hour, deleted all association keys I could find in registry (after which clicking on .frc would not open FC), then re-associated it in Window's own File Explorer using Open With after which the file would correctly open in FC. All in vain though, I keep getting exception when trying to Calculate. Desperate, I tried to associate frc_auto_file with FC using my Total Commander. And it worked. Now I can Calculate if FC was opened through .frc file click. Hallelujah."

 

Link to comment
Share on other sites

Just for your information, here is the last comunique from my user (the .frc he refers to is the file extension for Forecaster3 data files).

I think it is strange that under two different configurations of registry entries, double clicking the data file causes the program to start and run both times, but when the charting window forms are loaded, ChartFX.Lite fails in one case, but not the other. Maybe this a .NET2 bug concerning licenses? Do you have any idea about what the problem is?

His report (in 2 parts) follows:

All of those previous tricks, btw, failed to make my W2K work with .frc properly.

I'll keep trying...

<later>

Always knew that the best way to attract luck is to complain about lack of it. It now works on W2K as well. But still no pattern. Too complicated to describe all combinations of things I tried and the weird behavior that resulted (it could not find program to run, could not find forecaster3.exe, would work from Explorer but not from my Total Commander, would not remember Open With despite always open being checked, etc). Btw, there is no _auto entries in W2K, only regular .frc one. Eventually, I made it run by separately associating frc with full path in Total Commander and independently with Open With in Explored. Enough said.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...