protected void Session_Start(object sender, EventArgs e)
        {
            Session["init"] = 0;

            if (FeatureCheckHelper.IsFeatureEnabled(FeatureNames.TelemetryFeatureUsage)
                // ignore non-user pings
                && TelemetryState.IsTelemetryEnabledUserAgent()
                // ignore requests to and referred requests from specific paths
                && TelemetryState.IsTelemetryEnabledRequestPage()
                // only report this telemetry when the portal is configured
                && SetupConfig.IsPortalConfigured())
            {
                PortalFeatureTrace.TraceInstance.LogSessionInfo(FeatureTraceCategory.SessionStart);
            }
        }
Esempio n. 2
0
        public static void PreApplicationStart()
        {
            if (!SetupConfig.IsPortalConfigured())
            {
                ADXTrace.Instance.TraceInfo(TraceCategory.Application, "Configuring setup components.");

                DynamicModuleUtility.RegisterModule(typeof(SetupRoutingModule));
                RegisterBundles(BundleTable.Bundles);
            }
            else
            {
                ADXTrace.Instance.TraceInfo(TraceCategory.Application, "Configuring standard portal components.");

                DynamicModuleUtility.RegisterModule(typeof(PortalRoutingModule));

                AntiForgeryConfig.SuppressXFrameOptionsHeader = true;

                // read the connection settings from the local file

                CrmConfigurationProvider.ConfigurationCreated       += OnConfigurationCreated;
                PortalCrmConfigurationProvider.ConfigurationCreated += OnConfigurationCreated;
            }
        }