Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 Problem with license as embedded resource
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cheetah

4 Posts

Posted - 24 Jan 2007 :  13:54:39  Show Profile  Reply with Quote
I'm trying to build in my license file as an embedded resource so that I can do a ClickOnce deploy of the app. However, even without the ClickOnce deployment, this isn't working.

I make the call to ChartView.SetLicensePath in the static initializer for my class, so I'm quite sure it's getting called before any instances are created.

I put a breakpoint there in the debugger, and can see the resource stream with Assembly.GetManifestResourceStream("AssemblyName.QCLicense.lic.xml"), but I"m still getting the "your license has expired" message instead of my chart.

If I copy the license xml to the output dir, things work fine, but that won't work for a ClickOnce deployment, since data files end up in a different folder from DLLs.

quinncurtis

1164 Posts

Posted - 24 Jan 2007 :  15:18:25  Show Profile  Reply with Quote
What happens when you compile and run the LinePlotSalesVolume example program. That program demonstrates how to use an embedded license file.
Go to Top of Page

cheetah

4 Posts

Posted - 24 Jan 2007 :  15:40:17  Show Profile  Reply with Quote
It works, so I guess there must be something wrong with my project configuration ...

I did some more testing, and the problem seems to that my application is split into several projects. The chart ui elements are in a separate project from the main program, and thus compile to a DLL assembly and aren't in the main EXE assembly. If I embed the license into the EXE and call SetLicensePath("ExeAssemblyName") it works.

I'm guessing that the code to load the resource is accessing the wrong assembly to find it. Perhaps it should use Assembly.GetCallingAssembly() instead of GetEntryAssembly() or whichever one it is using?
Go to Top of Page

quinncurtis

1164 Posts

Posted - 24 Jan 2007 :  16:07:57  Show Profile  Reply with Quote

We intended that the license file be embedded in the main executable, so it is working as we would expect.
Go to Top of Page

cheetah

4 Posts

Posted - 25 Jan 2007 :  12:18:31  Show Profile  Reply with Quote
So should I interpret the limitation I found as a "yes we know and we won't fix it"?
Go to Top of Page

quinncurtis

1164 Posts

Posted - 25 Jan 2007 :  12:33:57  Show Profile  Reply with Quote
We have no plans to change our embedded licensing system to support embedding our license in any arbitrary DLL that is part of an overall application. The license needs to be embedded in the main exectuable of the application.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07