This Question is Answered

14 "helpful" answers available (3 pts)
9 Replies Last post: Apr 8, 2008 11:49 PM by Duke

About Curl License for Applet Hosting

Apr 4, 2008 3:49 AM

Click to view URPradhan's profile BlackBelt URPradhan 166 posts since
Mar 6, 2008
Hi Friends

I want to test my sample curl applets by hosting to my local pc using Apache WS and also want to test my applets by my friends in my LAN.
I'm able to test myself the applets (in my browser address: http://localhost/mysite ) by keeping curl-access.txt and curl-license-5.dat files @ root of my WS.

But my friends who are in my same n/w (in LAN) are not able to test the applets (http://myPCName/) like the error similar to "Invalid license file".
And it happens even in my PC when I type http://myPCName/ in my own browser instead of http://localhost/ :(
And this happens to applets which contains {import * from .....} statements.

I learn that; its all about Curl license, which EMBEDS the host name into the curl-license-5.dat binary file.

But, I'm actually working in a local development PC and I should be allowed to test the applets in my PC using my local PC name (with a private IP like 10.x.x.x series)

//Thanx
Click to view Duke's profile Curl Duke 179 posts since
Oct 17, 2007
1. Re: About Curl License for Applet Hosting Apr 4, 2008 11:02 AM
First, you need to decide if you are developing an application that needs a paid commercial license or if you can use a free license. If you are working for a corporation, then they should arrange for the development licenses that you need.

Our web form for licensing can be reached from http://www.curl.com/download/ide/key.php. The form does not seem to allow short hostnames without the domain parts. It does allow IP addresses, but I have not checked to make sure the generated license will actually work. That would be an issue with the form rather than a problem with the RTE.

So if you think a free license is the right one for your uses, then you might try (on our web form for license requests) the IP address form if you don't have an actual full hostname to use.
Click to view URPradhan's profile BlackBelt URPradhan 166 posts since
Mar 6, 2008
2. Re: About Curl License for Applet Hosting Apr 7, 2008 2:22 AM
in response to: Duke
Thank you Duke.
I got a license for my PC ie, myPC.example.com.

But still I'm getting exceptions in my few examples in spite of adding my PC to privileged host list from RTE Control Center.

1. When my applet is using "choose-directory" dialog box, it throws security exception, though I have added my host myPC.example.com to the privileged host list with "Allow All"
2. When I'm using Connected Record Set using BasicConnection to MySql
3. When I'm using Styled-Controls package which has been installed to C:\Program Files\Curl Corporation\Surge\7\lib\COM.CURL.GUI.STYLED-pcurl-en

All the above exceptions are related to secure applet. But I'm added my host to secure host list, then why I'm getting such exceptions ?

//Thanx in adv.
Click to view Duke's profile Curl Duke 179 posts since
Oct 17, 2007
3. Re: About Curl License for Applet Hosting Apr 7, 2008 8:44 AM
in response to: URPradhan
You can use {process-privileged?} to confirm that your applet is privileged.

You probably have a typo in the Add Privileged Host dialog of the RTE Control Panel.

You need to add "myPC.example.com" and do not use another form like "http://myPC.example.com/". This is a common problem and unfortunately we have not changed the Control Panel to do validation of that input.

Code signing is another alternative way of giving privilege to applets.
Click to view URPradhan's profile BlackBelt URPradhan 166 posts since
Mar 6, 2008
4. Re: About Curl License for Applet Hosting Apr 7, 2008 8:55 PM
in response to: Duke
Thank you again Duke.

BTW, I was checking the privilege with {process-privilege?} stmt, but adding the host in secure list @ RTE Control Pannel as http://mysite.example.com.
Now I have removed the http part from the host name, but again landed into the first problem of license, which is throwing the exception like ....

"LicenseException: An applet attempted to use a feature ('privilege') that is not supported by its deployment license. The applet may successfully run if you remove any directories containing the applet's Url from the Privileged Locations in the Curl Control Panel and reload the applet"

I have deployed the license that I got from your online license generation tool (link in ur previous reply)

Or the generated license does not support privilege applets ? confused :(

//Thanx
Click to view Duke's profile Curl Duke 179 posts since
Oct 17, 2007
5. Re: About Curl License for Applet Hosting Apr 7, 2008 11:18 PM
in response to: URPradhan
Oh, I see. I was not thinking about you running with a free server license , which does not allow applets to run with privilege or a few other features which I list below.

Quoted from the Developer's Guide, Getting Started chapter:

====

The Curl server license is also available in both Curl server license and Curl Pro server license versions. Upgrading your server license to the Curl Pro Server License enables your applets to take advantage of the following features:

* The ability to run applets with privilege, see Privileged Applets.
* The encryption API, see EncryptStream.
* Browser-resident http, see request-browser-resident-http.
* Secure http access using the https: scheme, see Reading Files on Web Sites.
* Use of subapplets, see AppletData and AppletGraphic.

Applets run from the local file system do not need a license and can use all of the Curl Pro features. During development, it is common practice to deploy to a local web server. Server licenses for localhost can be found in <curl install directory>\ide\etc\localhost-personal\curl-license-5.dat for a Curl license and <curl install directory>\ide\etc\localhost-pro\curl-license-5.dat for a Curl Pro license. For deployment on any web (http) location other than localhost, visit Curl Inc. to obtain either a free Curl license or a paid Curl Pro server license.

=====

As to your specific security exception problems:

1. choose-directory requires privilege. I think this is because an unprivileged applet would not be allowed to do anything with the directory anyway. The Security chapter says "Applets cannot list directories in the file system, or use methods or procedures that return a path within the file system. This restriction prevents applets from learning about the filesystem structure." If there is a specific file, an unprivileged applet can work with it if the user chooses it with one of the choose-file, choose-multiple-files, or choose-location dialogs. There is also the request-local-data-permission proc , which can be used by unprivileged applets (with the free server license) in versions of 6.0.2 or later; some documentation might not reflect that 6.0.2 change yet.
That change was made so that Occasionally Connected Computing applets could run with the free server license.

2. "When I'm using Connected Record Set using BasicConnection to MySql". This can be worked around if you can put a curl-access.txt file on the server running MySql. An unprivileged applet needs to have a curl-access.txt file on a server in order to allow it to read data from a server. This helps with the security issues of running unknown-author applets on client machines that are behind your firewall, and also with not being an actor in denial of service attacks.

3. "When I'm using Styled-Controls package which has been installed to C:\Program Files\Curl Corporation\Surge\7\lib\COM.CURL.GUI.STYLED-pcurl-en" This is the usual problem with unprivileged applets not being allowed to read local files. If this package was imported from the same server as the applet, then there would not be a problem as long as the applet's server had a curl-access.txt file on it.
Click to view URPradhan's profile BlackBelt URPradhan 166 posts since
Mar 6, 2008
6. Re: About Curl License for Applet Hosting Apr 8, 2008 3:20 AM
in response to: Duke
Thanx again.

The ConnectRecordSet problem with MySql has been solved by putting the curl-access.txt file @ C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\cdbc-server

But the others are there as they need privilege and I do not have pro license :(

//Thank you
Click to view Duke's profile Curl Duke 179 posts since
Oct 17, 2007
7. Re: About Curl License for Applet Hosting Apr 8, 2008 9:05 AM
in response to: URPradhan
You should also be able to use the pcurl version of the COM.CURL.GUI.STYLED-pcurl-en package if you put it on a web server (not necessarily the same server as the other applet files, if the server's curl-access.txt file allows it) rather than as a local file. You need a Pro IDE (which is a separate license from the server license) to generate pcurl files, but a free server license will still allow an applet to load pcurl files if you get them from someone who did have an IDE Pro license.
Click to view URPradhan's profile BlackBelt URPradhan 166 posts since
Mar 6, 2008
8. Re: About Curl License for Applet Hosting Apr 8, 2008 10:02 PM
in response to: Duke
Do you mean to say, I should use the procedure "pcurl-file" to create a *.pcurl file from the COM.CURL.GUI.STYLED-pcurl-en package ?
I have trial IDE Pro license, then I should be able to create the *.pcurl preprocessed package.
Click to view Duke's profile Curl Duke 179 posts since
Oct 17, 2007
9. Re: About Curl License for Applet Hosting Apr 8, 2008 11:49 PM
in response to: URPradhan
No, sorry about being confusing. I just wanted to point out that the fact that you need a Pro IDE to run the commands to make a project's pcurl files does not mean that the applet that loads those pcurl files requires a Pro server license.

The COM.CURL.GUI.STYLED-pcurl-en package already has its files in a .pcurl form.

Also, another interesting fact: I think you can run applets that use the pcurl-file procedure to make .pcurl files even without an IDE, but that would be less convenient than using the Pro IDE.