Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Custom KeyGenerator

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
JoeCritter



Joined: 21 Feb 2007
Posts: 6

PostPosted: Thu Feb 22, 2007 6:44 am    Post subject: Custom KeyGenerator Reply with quote

You might have to explain this one to me like I'm a four year old.

I'm going to be receiving requests from licenses from a distributor via http POST's.

Say I want to license my app based on firstName and lastName. As I understand it, I need two things:

A) An ASP.NET app that accepts the POST, does it's thing, and returns the license key.

B) A Custom Key Generator that puts the firstName and lastName fields into the Product Info.

My questions are:

1) So In the ASP.NET app, I know I am supposed to call EncryptedLicenseProvider.GenerateKey(). Does my CustomKeyGenerator gets called via some handwaving magic?

2) Or am I supposed to generate the correct ProductInfo inside of ASP.NET when I make the call to GenerateKey()?

3) In either situation how do I tell the LicenseTracker about my new customer, sale & fresh-off-the-press-license ( and have it all get saved in it's database)? Calling this method seems to bypass the LicenseTracker app entirely.

4) How does a custom Key Generator ever find out about the customer if it's coming from my code? All of the examples I've seen assume it's getting passed in from some place or entered at the last second on a Form.

5) Pure guess: Am I just supposed to make up a license for a John Doe and it WONT get recorded by the License Tracker (or maybe just the generation of the license will), but rely that my distributor will eventually provide me with sales data about it all (or sales data that corresponds to the data I have about some license I sent out because he told me to).

Hope I'm making sense...
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Feb 22, 2007 7:10 am    Post subject: Reply with quote

Quote:
1) So In the ASP.NET app, I know I am supposed to call EncryptedLicenseProvider.GenerateKey(). Does my CustomKeyGenerator gets called via some handwaving magic?


No, the CustomKeyGenerator mechanism is purely a way of extending the LicenseTracker application to provide a nicer interface that generates the ProductInfo for you based on data you enter in a custom form. It won't be called by EncryptedLicenseProvider.GenerateKey

Quote:
Or am I supposed to generate the correct ProductInfo inside of ASP.NET when I make the call to GenerateKey()?


Correct.

Quote:
In either situation how do I tell the LicenseTracker about my new customer, sale & fresh-off-the-press-license ( and have it all get saved in it's database)? Calling this method seems to bypass the LicenseTracker app entirely.


See next

Quote:
5) Pure guess: Am I just supposed to make up a license for a John Doe and it WONT get recorded by the License Tracker (or maybe just the generation of the license will), but rely that my distributor will eventually provide me with sales data about it all (or sales data that corresponds to the data I have about some license I sent out because he told me to).


Yes that's normally how it works. Most 3rd party distributors will send email notifications of each sale generally with an attachment that you can then use the import definition mechanism to import directly from outlook.

If they don't do this (they should if they are half decent) it would be relatively easy to generate an email yourself in your ASP.NET app and send the email with the data attached.

It would also be worth you taking a look at our IPN.NET product which does this automatically for PayPal payments.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
JoeCritter



Joined: 21 Feb 2007
Posts: 6

PostPosted: Thu Feb 22, 2007 7:31 am    Post subject: Reply with quote

Infralution wrote:

Yes that's normally how it works. Most 3rd party distributors will send email notifications of each sale generally with an attachment that you can then use the import definition mechanism to import directly from outlook.

If they don't do this (they should if they are half decent) it would be relatively easy to generate an email yourself in your ASP.NET app and send the email with the data attached.


Handango does CSV Reports on (at most) a daily basis. I assume I can import them into the Tracker?

Infralution wrote:

It would also be worth you taking a look at our IPN.NET product which does this automatically for PayPal payments.


I know...but I already wrote my own Java Servlet for IPN so buying the product is overkill. I'd be spending the money on a code-example.

So IPN.NET imports the email confirmation into the tracker rather than records the outbound license in the tracker too?

Basically I'm trying to make sure I can reconcile outbound licenses I generate to the purchases I am told about from the distributor . I figure that's *the* selling point of generating the distributor's license keys at sale-time myself. Can the Tracker help with this?

[/quote]
Back to top
View user's profile Send private message
JoeCritter



Joined: 21 Feb 2007
Posts: 6

PostPosted: Thu Feb 22, 2007 8:01 am    Post subject: Reply with quote

Scratch that. They will do invidual emails.
Back to top
View user's profile Send private message
JoeCritter



Joined: 21 Feb 2007
Posts: 6

PostPosted: Sat Feb 24, 2007 8:24 am    Post subject: Three More on this topic Reply with quote

Since these are needed for the call to GenerateKey()

1) In this ASP.NET app, how do you go about managing serial numbers?

2) The boolean for the checksum of the productInfo. Does it actually modify the ProductInfo string? My app needs to do validation on the licenseInfo (to make sure it's this user's license. Do I have to do any "unmangling" or is the productInfo I generated what gets back to me?

And a third for CF issues.

The license key strings are really obscenely long. That's not a big deal on a desktop app where one can cut and paste between windows, but that's not possible for my app (unless the user gets his key emailed to his PDA). Is there an easier way? It might be a dealbreaker as far as usability goes. I may not be able to use the Licensing API...
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Sun Feb 25, 2007 9:29 pm    Post subject: Reply with quote

Quote:
1) In this ASP.NET app, how do you go about managing serial numbers?


You need to save the last serial number issued in a file and increment it each time you issue a license. Since you will still probably want to issue some licenses manually using License Tracker it is a good idea to start the serial number from an offset (eg 1000). Your manually issued licenses can then start from serial no 1.

Quote:
The boolean for the checksum of the productInfo. Does it actually modify the ProductInfo string? My app needs to do validation on the licenseInfo (to make sure it's this user's license. Do I have to do any "unmangling" or is the productInfo I generated what gets back to me?


The checksum does not change the ProductInfo string - it simply includes an extra checksum in the license key which is used to validate the product info. The license parameters you use in your code to read the license key must be generated with the same option you use here. The separate checksum is only necessary if the length of you product info exceeds 5 characters.

Quote:
The license key strings are really obscenely long. That's not a big deal on a desktop app where one can cut and paste between windows, but that's not possible for my app (unless the user gets his key emailed to his PDA). Is there an easier way?


The length of the license keys depends on the length of the ProductInfo you include in the key. The shortest key you can produce is 32 characters long. This allows for up to 5 characters of product info. Normally if you want to keep license keys short you keep product info short by including a checksum on the actual data (eg the User Name) rather than the actual data. When you read the license key you then validate that the checksum matches the actual data. The EncryptedLicense.Checksum method provides a convenient short checksum.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group