public FileResult DownloadLicense()
        {
            string licenseMap = ReadResourceContent("FE.Creator.FEConsoleAPI.Config.Module.LicenseMaps.xml");

            logger.LogDebug(string.Format("licenseMap = {0}", licenseMap));
            XDocument document = XDocument.Parse(licenseMap);
            var       modules  = from f in document.Descendants("module")
                                 select new XElement("moudle", f.Attribute("licenseId").Value);

            XDocument licenseDocument = new XDocument();

            XElement grandListElement = new XElement("grantlist", modules.ToArray());

            grandListElement.Add(new XAttribute("expireddate", DateTime.Now.AddYears(1).ToString("MM/dd/yyyy")));
            grandListElement.Add(new XAttribute("version", "1.0.0.0"));

            byte[] signedData = cryptoGraphysvc.HashAndSignBytes(Encoding.UTF8.GetBytes(grandListElement.ToString(SaveOptions.DisableFormatting)),
                                                                 configuration["SiteSettings:Security:PrivateKey"]);
            var productKeyElment = new XElement("productkey",
                                                Convert.ToBase64String(signedData));

            XElement rootElment = new XElement("license",
                                               grandListElement,
                                               productKeyElment);

            licenseDocument.Add(rootElment);

            string license     = licenseDocument.ToString();
            var    licenseFile = new FileContentResult(Encoding.UTF8.GetBytes(license)
                                                       , "application/xml");

            licenseFile.FileDownloadName = "license.xml";

            return(licenseFile);
        }