Beispiel #1
0
        protected void IntializeCustomExtensionsPanel()
        {
            double iisVersion = HttpContextHelper.GetIISVersion(Request.ServerVariables["SERVER_SOFTWARE"]);

            if (iisVersion == 0 || iisVersion >= 7.0d)
            {
                if (IsIntegratedPipelineMode())
                {
                    if (IsHandleAllRequestsConfigured())
                    {
                        StoreSettingsManager settings = AbleContext.Current.Store.Settings;
                        phCustomExtensionsConfigured.Visible = true;
                        AllowCustomExtensions.Checked        = settings.SeoAllowCustomExtensions;
                        AllowedExtensions.Text = settings.SeoAllowedExtensions;
                        CustomExtensionsPanel.Style["display"]       = AllowCustomExtensions.Checked ? "block" : "none";
                        AllowUrlWithoutExtensions.Checked            = settings.SeoAllowUrlWithoutExtension;
                        RemoveWebConfigurationPanel.Style["display"] = AllowCustomExtensions.Checked ? "none" : "block";
                    }
                    else
                    {
                        phCustomExtensionsUnconfigured.Visible = true;
                    }
                }
                else
                {
                    DisableCustomExtensions("Custom extensions can only be supported when Integrated Pipeline mode is used. We detected that your application is using Classic ASP.NET mode. You will need to update your IIS application settings in order to take advantage of this feature.");
                }
            }
            else
            {
                DisableCustomExtensions("Custom extensions can only be supported on IIS 7.0 or higher. We detected version IIS " + iisVersion.ToString() + ", so this feature is not available. You may only create redirects with the aspx extension.");
            }
        }
        protected void Page_Init(object sender, EventArgs e)
        {
            // DISPLAY WARNING MESSAGE FOR IIS VERSION BELOW 7
            double iisVersion = HttpContextHelper.GetIISVersion(Request.ServerVariables["SERVER_SOFTWARE"]);

            IISVersionWarning.Visible = iisVersion > 0.0d && iisVersion < 7.0d;

            // STATISTICS TRACKING ENABLED
            if (!AbleContext.Current.Store.Settings.SeoTrackStatistics)
            {
                RedirectsGrid.Columns[4].Visible = false;
                RedirectsGrid.Columns[5].Visible = false;
            }
        }