I’m attempting to add some very rudamentary licensing for a plugin i’ve finished up for internal use.
I’m using the example code from the C# plugin, digitally signed it and loaded into Rhino. Since there is no license It does pop up for me to enter one, and upon clicking “Enter License” nothing happens. I am not able to enter a license code or anything. the Plugin.GetLicense is returning false and exiting the sample code.
Very new to licensing, but I do understand I will have to do all of the validation of the key, just not sure how to get an opportunity for a user to enter the license information so that I can distribute appropriate stand-alone keys.
Put a breakpoint in your ValidateProductKey function. Is it called? Are you filling in the LicenseData object? Is the function returning ValidateResult.Success?
The ValidateProductKey function is not being called. The code from the sample project looks like this.
It hits the GetLicense function and GetLicense is returning false.
protected override Rhino.PlugIns.LoadReturnCode OnLoad(ref string errorMessage)
// Ask Rhino to get a product license for us.
System.Windows.Forms.MessageBox.Show("I got here to OnLoad");
bool rc = GetLicense(Rhino.PlugIns.LicenseBuildType.Release, this.ValidateProductKey);
I just tested the C# sample found at your link, and it seems to work here. So does this sample.
Of course, your plug-in must be signed with an Authenticode certificate issued by McNeel Plugin Security.
Not sure what other questions to ask. Feel free to send me the source to a plug-in that doesn’t work.
I digitally sign it, it does say successful, I install the Plugin with PluginManager, a window pops up saying can’t find a license, and when I hit enter license it busts out and gives me the unable to load plugin at the Rhino command line. If I choose either Zoo / Buy License those do in fact do something.
Should I be signing the RHP or DLL file?
I also tried the ZooTest You linked and had the exact same issues. Is it possible it’s my Rhino? I currently do not use licensing from any Zoo servers I am trying to setup these licenses as a standalone.
You haven’t given me much to go on. So all I can do is ask more questions…
Did you email Brian Gillespie and request a Authenticode certificate? Are you signing your plug-in with this certificate?
Are you using the sample code we provide? Can you email me your plug-in?
Anything else you can provide might be helpful…