I have also confirmed that the communication channel from the AI registration dialog in my application and my license server is working.
However, the AI Registration dialog always returns "the registration key is invalid".
Code: Select all
String data = "";
if (compID != null)
data += "COMP_ID=" + compID;
data += "ID=" + ID;
if (MP != null)
data += "MP=" + MP;
....
// compute signature
byte[] dataToSign = Encoding.Unicode.GetBytes(data);
byte[] signature = rsaProvider.SignData(dataToSign, new SHA1CryptoServiceProvider());
// Step 4 - Respond with the license elements
// if your license has a Maintainance Plan element (or any other elements) add them in alphabetical order
string responseData = $"ID={ID};MP={MP};SIGN={Convert.ToBase64String(signature)}";
SendResponse(200, responseData);
New Request: ID=squagel@gmail.com; COMP_ID=5260331983682616;
Request Response: ID=squagel@gmail.com;MP=03/05/2022;SIGN=IDJBReIlv1X2+F1Y9A/G7Ia0eGcVRPejw3p/6tNe9L9Rhya84/oLZ9aDCIIUsjOQ
If I manually enter the same ID, COMP_ID and MP date into the "Generate Registration Keys" dialog in AI, I get the exact same signature value so I'm confident that I'm computing it correctly.
Is there any way to debug what might be causing the error in the licensing dialog? I think I have followed the instructions to the letter but Is my response string not properly formatted perhaps?
Any help would be much appreciated.