Page 1 of 1

Licensing Problem with Client/Server

Posted: Wed Nov 01, 2006 6:56 pm
by 9640494
I am having a similar issue as to a few posts already with licensing issues when running my client/server app on another machine besides my development machine.

I have a teechart (visibile at designtime) inside of a dll. That dll references my licenses.licx file and contains the following line in it:

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

That particular dll is called from another dll, which is in turn called from the main executable.

I have tried dropping a teechart on both the second dll form and the main executable form to create the licenses.licx file and then deleting the teechart off of the forms. The license.licx files stay (with the same line as above in them), but when I compile my project I don't see a reference to the tchart in my manifest when viewing it through il dasm.

I have read Tutorial 17 and followed all instructions in it. My licenses.licx files are being compiled as an embedded resource.

I have put the following registry keys on my server machine, but it still does not work when I run the application from another machine other than my development machine.

"VirtualShare"="/TeeChartForNET"
"ShareFolder"="C:\\Program Files\\Steema Software\\TeeChart for .NET v2\\TeeChartForNET"
"DesignKeyV2"="Steema.TeeChart.TChart is a licensed component."


Please help!

Posted: Thu Nov 02, 2006 10:45 pm
by Marc
Hello,

License registry entries shouldn't be necessary in a runtime machine when the TeeChart License is correctly compiled to an assembly.

The procedure you describe to have taken appears correct. Weve repeated steps here to confirm that there's no inherent problem. Steps taken:
- Create UserControl, put TeeChart on Form and add a button to change some aspect of the Chart (FillSampleValues on a Series). The project automatically includes a Licenses.licx file when the Chart is added to the Form
- Create a second UserControl. Add the first user control to the tool palette and drag it onto the second UserControl's form. Add a button to the second UserControl to modify some parameter of the first UserControl (eg. BackColor). Itis not necessary to create a Licenses.Lics file for the intermediate level UserControl, it requires only to exist at upper level of chain (executing assembly)
- Create New Windows Form app. Add second UserControl to Form and build. Note, if you modify contents of DesignKeyV2 at this stage the application will report a license error when run

(eg mod reg key to: "DesignKeyV2"="xxSteema.TeeChart.TChart is a licensed component." for app to fail. Return the contents of the key to its correct value to continue)

You need to take the step you took, ie. to create a Licenses.Licx file. Here we used the approach you described, adding a TChart to the form then deleting it. The app then compiles and runs correctly here even when the contents of the registry key is modified.
---
Please could you compare the steps taken to those of your project and if you don't see a cause for the problem let us know what variation we should make to our steps to reproduce the problem your project experiences.

With thanks.
Regards,
Marc Meumann

Posted: Thu Nov 02, 2006 11:34 pm
by 9640494
I did forget to mention a key factor in my last post. I am running this in a client/server environment in which I am using .NET Remoting to pass my objects back and forth. I am using clientactivated objects in my config files. I can post the code for the config files if needed.

I re-ran another test in which I added some dummy forms to my calling executable and my first called dll. On both of those forms I added a Teechart. After re-compiling, I verified that my manifest for the executable and the two dlls did have a reference to the TeeChart. However, I still get a license error.

Posted: Fri Nov 03, 2006 2:33 pm
by Marc
Hello,

If you are compiling across different machines confirm that all machines have a designtime license installed and that they are running the same build release of TeeChart.

In the test that you ran, does the executable work correctly in the machine in which the TeeChart designtime license is installed?

We'll look to setting up a remoting test here.

Regards,
Marc Meumann

Posted: Fri Nov 03, 2006 3:21 pm
by 9640494
No, I am not compiling across machines. I am only building and compiling on a single machine. That machine has a designtime license.

What I am doing in the client/server environment is setting up the objects as remotable objects. They necessary dll's and exe's get downloaded to the c:\windows\assembly\download folder on each client machine.

Posted: Fri Nov 03, 2006 5:07 pm
by Marc
Hello,

Ok, thanks.

Does the executable work correctly in the machine in which the TeeChart designtime license is installed?

Does the executable work correctly in the machine in which the TeeChart designtime license is installed if you invalidate the designtime license? (eg mod reg key to: "DesignKeyV2"="xxSteema.TeeChart.TChart is a licensed component." for app to fail. Return the contents of the key to its correct value to continue)

Regards,
Marc Meumann

Posted: Fri Nov 03, 2006 5:26 pm
by 9640494
Yes, the executable works fine on the machine with the designtime license.

No, the code does not even compile if I change the reg key to DesignKeyV2"="xxSteema.TeeChart.TChart is a licensed component

Posted: Tue Nov 28, 2006 5:45 pm
by Marc
Hello,

Sorry for the delay getting results back on this.

We tested TeeChart for .NET in a simple remoting project. The tests confirm that with the correct positioning of the license file in the project the remote client may use the server hosted TeeChart without any noticeable problem. If licenses.licx isn't present at the correct location at project compile time then the client can't create the TeeChart at the server.

The test comprises of
- an object (dll library) that creates a Chart and extracts text from the Chart header
- a server to host access to the dll (licenses.licx file located in this project)
- a client for remote access.

The example may be downloaded from:
http://www.steema.com/files/public/teec ... ngTest.zip

If the project doesn't come close to the definition of the project that is causing problems please could you make the modifications to the test project if possible and post it to the TeeChart attachments newsgroup.

news://www.steema.net/steema.public.attachments

Regards,
Marc Meumann

Latest Update

Posted: Thu Nov 30, 2006 6:45 pm
by 9640494
Marc -

Thank you for your reply and test project. After looking at it and running some more tests of my own, I have found the problem to be different from what I had originally thought.

The licensing problem has nothing to do with remoting objects or calling a dll from a dll. Instead, the problem stems from running a program that was downloaded to a client machine into the C:\Windows\Assembly\Download folder. This is done when running the application as a Smart Client program. It actually doesn't even have to be a client/server program.

I can run a program on a test machine when just running it locally and it runs fine. However, if I download the exact same program from a server (and all the necessary dll's), into the above mentioned folder, I get the licensing error.

I have made a couple of tests programs to demonstrate the problem. However, I do not have access to newsgroups from my work computer. Is there somewhere else I can send you the files for you to test? I would really appreciate it if this could be looked into as soon as possible.

Thanks.

Posted: Fri Dec 01, 2006 8:14 am
by narcis
Hi Arnold,

I've sent you a forums private message with the address where you should send the files.