protected void Page_Load(object sender, EventArgs e) { this.titleElem.TitleText = GetString("InvalidLicense.Header"); this.titleElem.TitleImage = GetImageUrl("Others/Messages/denied.png"); this.lblRawUrl.Text = GetString("InvalidLicense.RawUrl"); this.lblResult.Text = GetString("InvalidLicense.Result"); // URL string rawUrl = QueryHelper.GetString("rawUrl", String.Empty).Trim(); if (rawUrl != String.Empty) { lblRawUrlValue.Text = HttpUtility.HtmlEncode(rawUrl); } else { lblRawUrl.Visible = false; lblRawUrlValue.Visible = false; } // Validation result LicenseValidationEnum mResult = (LicenseValidationEnum)QueryHelper.GetInteger("Result", Convert.ToInt32(LicenseValidationEnum.NotAvailable)); string mStringResult = String.Empty; switch (mResult) { case LicenseValidationEnum.Expired: mStringResult = "KeyExpired"; break; case LicenseValidationEnum.Invalid: mStringResult = "InvalidKey"; break; case LicenseValidationEnum.Valid: mStringResult = "ValidKey"; break; case LicenseValidationEnum.WrongFormat: mStringResult = "WrongFormat"; break; case LicenseValidationEnum.Unknown: mStringResult = "Unknown"; break; default: mStringResult = "NotAvailable"; break; } lblResultValue.Text = GetString("invalidlicense." + mStringResult); // URL 'Go to:' lnkGoToValue.ToolTip = URLHelper.GetAbsoluteUrl(URLHelper.WebApplicationVirtualPath) + "CMSSiteManager"; lnkGoToValue.NavigateUrl = URLHelper.GetAbsoluteUrl(URLHelper.WebApplicationVirtualPath) + "CMSSiteManager/default.aspx?section=licenses"; lblAddLicenseValue.Text = URLHelper.GetCurrentDomain(); }
protected void Page_Load(object sender, EventArgs e) { // Setup page title text and image CurrentMaster.Title.TitleText = GetString("Licenses_License_List.Title"); CurrentMaster.Title.TitleImage = GetImageUrl("Objects/CMS_LicenseKey/object.png"); CurrentMaster.Title.HelpTopicName = "licenses_list"; CurrentMaster.Title.HelpName = "helpTopic"; // Prepare the new class header element string[,] actions = new string[3, 8]; actions[0, 0] = "HyperLink"; actions[0, 1] = GetString("Licenses_License_List.New"); actions[0, 3] = "~/CMSModules/Licenses/Pages/License_New.aspx"; actions[0, 5] = GetImageUrl("Objects/CMS_LicenseKey/add.png"); actions[1, 0] = "HyperLink"; actions[1, 1] = GetString("license.list.export"); actions[1, 3] = "~/CMSModules/Licenses/Pages/License_Export_Domains.aspx"; actions[1, 5] = GetImageUrl("Objects/CMS_LicenseKey/export.png"); // Not supported in 5.0 final //actions[2, 1] = GetString("license.list.import"); //actions[2, 3] = "~/CMSModules/Licenses/Pages/License_Import_Licenses.aspx"; //actions[2, 5] = GetImageUrl("Objects/CMS_LicenseKey/import.png"); CurrentMaster.HeaderActions.Actions = actions; UniGridLicenses.GridView.PageSize = 20; UniGridLicenses.OnAction += new OnActionEventHandler(UniGridLicenses_OnAction); UniGridLicenses.OnExternalDataBound += new OnExternalDataBoundEventHandler(UniGridLicenses_OnExternalDataBound); UniGridLicenses.ZeroRowsText = GetString("general.nodatafound"); // Check if valid license for current domain exists LicenseValidationEnum validationResult = LicenseHelper.ValidateLicenseForDomain(URLHelper.GetCurrentDomain()); if (validationResult != LicenseValidationEnum.Valid) { // Build invalid license string StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0} <strong>{1}</strong><br /><br />", GetString("InvalidLicense.Result"), LicenseHelper.GetValidationResultString(validationResult)) .AppendFormat("<strong>{0}</strong><br /><ul>", GetString("invalidlicense.howto")) .AppendFormat("<li>{0} ", GetString("invalidlicense.howto.option1.firstpart")) .AppendFormat("<a target=\"_blank\" href=\"{0}\" title=\"{1}\">{2}</a>", CLIENT_PORTAL, CLIENT_PORTAL, GetString("invalidlicense.clientportal")) .AppendFormat("{0}</li>", GetString("invalidlicense.howto.option1.secondpart")) .AppendFormat("<li>{0} <a href=\"mailto:{1}\">{2}</a>.</li>", GetString("invalidlicense.howto.option2"), SUPPORT_MAIL, SUPPORT_MAIL) .AppendFormat("<li>{0} ", GetString("invalidlicense.howto.option3.firstpart")) .AppendFormat("<a target=\"_blank\" href=\"{0}\" title=\"{1}\">{2}</a>", CLIENT_PORTAL, CLIENT_PORTAL, GetString("invalidlicense.clientportal")) .AppendFormat("{0}</li></ul>", GetString("invalidlicense.howto.option3.secondpart")); ShowWarning(GetString("invalidlicense.currentdomain"), sb.ToString(), null); } }
/// <summary> /// Handles the Load event of the Page control. /// </summary> protected void Page_Load(object sender, EventArgs e) { // Provide application name for client to refresh breadcrumbs correctly RequestContext.ClientApplication.Add("applicationName", ResHelper.GetString("Dashboard")); // Check license for the current domain LicenseValidationEnum licenseCheck = LicenseHelper.ValidateLicenseForDomain(RequestContext.CurrentDomain); if (licenseCheck != LicenseValidationEnum.Valid) { URLHelper.ResponseRedirect(URLHelper.ResolveUrl("~/CMSMessages/invalidlicensekey.aspx")); } SetupDashboard(); }
/// <summary> /// Handles the Load event of the Page control. /// </summary> protected void Page_Load(object sender, EventArgs e) { // Check license for the current domain LicenseValidationEnum licenseCheck = LicenseHelper.ValidateLicenseForDomain(RequestContext.CurrentDomain); if (licenseCheck != LicenseValidationEnum.Valid) { URLHelper.ResponseRedirect(URLHelper.ResolveUrl("~/CMSMessages/invalidlicensekey.aspx")); } InitializeLicenseOwner(); // Provide application name for client to refresh breadcrumbs correctly RequestContext.ClientApplication.Add("applicationName", GetString("cms.dashboard")); ScriptHelper.RegisterAngularModule("CMS.ApplicationDashboard/main"); }
protected void Page_Load(object sender, EventArgs e) { // Try skip IIS http errors Response.TrySkipIisCustomErrors = true; // Set error state Response.StatusCode = 503; titleElem.TitleText = GetString("InvalidLicense.Header"); lblRawUrl.Text = GetString("InvalidLicense.RawUrl"); lblResult.Text = GetString("InvalidLicense.Result"); // URL string rawUrl = QueryHelper.GetString("rawUrl", String.Empty).Trim(); if (rawUrl != String.Empty) { lblRawUrlValue.Text = HttpUtility.HtmlEncode(rawUrl); } else { lblRawUrl.Visible = false; lblRawUrlValue.Visible = false; } // Validation result LicenseValidationEnum mResult = (LicenseValidationEnum)QueryHelper.GetInteger("Result", Convert.ToInt32(LicenseValidationEnum.NotAvailable)); lblResultValue.Text = LicenseHelper.GetValidationResultString(mResult); // URL 'Go to:' lnkGoToValue.NavigateUrl = ApplicationUrlHelper.GetApplicationUrl("Licenses", "Licenses"); lblAddLicenseValue.Text = RequestContext.CurrentDomain; // How to get license options lnkOpt1.NavigateUrl = CLIENT_PORTAL; lnkOpt1.ToolTip = CLIENT_PORTAL; lnkOpt3.NavigateUrl = CLIENT_PORTAL; lnkOpt3.ToolTip = CLIENT_PORTAL; if (mResult == LicenseValidationEnum.Expired) { genTrial.InnerHtml = GetString("invalidlicense.trialexpired"); genTrial.Visible = true; } }
protected void Page_Load(object sender, EventArgs e) { // Try skip IIS http errors Response.TrySkipIisCustomErrors = true; // Set error state Response.StatusCode = 503; titleElem.TitleText = GetString("InvalidLicense.Header"); titleElem.TitleImage = GetImageUrl("Others/Messages/denied.png"); lblRawUrl.Text = GetString("InvalidLicense.RawUrl"); lblResult.Text = GetString("InvalidLicense.Result"); // URL string rawUrl = QueryHelper.GetString("rawUrl", String.Empty).Trim(); if (rawUrl != String.Empty) { lblRawUrlValue.Text = HttpUtility.HtmlEncode(rawUrl); } else { lblRawUrl.Visible = false; lblRawUrlValue.Visible = false; } // Validation result LicenseValidationEnum mResult = (LicenseValidationEnum)QueryHelper.GetInteger("Result", Convert.ToInt32(LicenseValidationEnum.NotAvailable)); lblResultValue.Text = LicenseHelper.GetValidationResultString(mResult); // URL 'Go to:' lnkGoToValue.ToolTip = URLHelper.GetAbsoluteUrl(URLHelper.WebApplicationVirtualPath) + "CMSSiteManager"; lnkGoToValue.NavigateUrl = URLHelper.GetAbsoluteUrl(URLHelper.WebApplicationVirtualPath) + "CMSSiteManager/default.aspx?section=licenses"; lblAddLicenseValue.Text = URLHelper.GetCurrentDomain(); // How to get license options lnkOpt1.NavigateUrl = CLIENT_PORTAL; lnkOpt1.ToolTip = CLIENT_PORTAL; lnkOpt3.NavigateUrl = CLIENT_PORTAL; lnkOpt3.ToolTip = CLIENT_PORTAL; }