public ProductLicenseInfo GenerateAndActivateWebProductKey(short productID, short trialDays, short numberOfUsers, string username, string company, string userEmail, string machineHash) { string privateXmlKey = Helpers.GetResourceString("KProcess.Ksmed.Server.Activation.Resources.PrivateKey.xml"); ProductKeyPublisher keyPublisher = new ProductKeyPublisher(privateXmlKey); string productKey = keyPublisher.GenerateWebProductKey(productID, trialDays, numberOfUsers, username, company, userEmail); return(new ProductActivation(privateXmlKey) .ActivateWebProduct(productKey, machineHash)); }