void OneTimeInit() {
            SessionStateSection config = RuntimeConfig.GetAppConfig().SessionState;

            s_configPartitionResolverType = config.PartitionResolverType;
            s_configSqlConnectionFileName = config.ElementInformation.Properties["sqlConnectionString"].Source;
            s_configSqlConnectionLineNumber = config.ElementInformation.Properties["sqlConnectionString"].LineNumber;
            s_configAllowCustomSqlDatabase = config.AllowCustomSqlDatabase;
            s_configCompressionEnabled = config.CompressionEnabled;

            if (_partitionResolver == null) {
                String sqlConnectionString = config.SqlConnectionString;

                SessionStateModule.ReadConnectionString(config, ref sqlConnectionString, "sqlConnectionString");
                s_singlePartitionInfo = (SqlPartitionInfo)CreatePartitionInfo(sqlConnectionString);
            }
            else {
                s_usePartition = true;
                s_partitionManager = new PartitionManager(new CreatePartitionInfo(CreatePartitionInfo));
            }

            s_commandTimeout = (int)config.SqlCommandTimeout.TotalSeconds;
            s_retryInterval = config.SqlConnectionRetryInterval;

            s_isClearPoolInProgress = 0;

            // We only need to do this in one instance
            s_onAppDomainUnload = new EventHandler(OnAppDomainUnload);
            Thread.GetDomain().DomainUnload += s_onAppDomainUnload;

            // Last thing to set.
            s_oneTimeInited = true;
        }
 private void OneTimeInit()
 {
     SessionStateSection sessionState = RuntimeConfig.GetAppConfig().SessionState;
     s_configPartitionResolverType = sessionState.PartitionResolverType;
     s_configStateConnectionString = sessionState.StateConnectionString;
     s_configStateConnectionStringFileName = sessionState.ElementInformation.Properties["stateConnectionString"].Source;
     s_configStateConnectionStringLineNumber = sessionState.ElementInformation.Properties["stateConnectionString"].LineNumber;
     s_configCompressionEnabled = sessionState.CompressionEnabled;
     if (this._partitionResolver == null)
     {
         string stateConnectionString = sessionState.StateConnectionString;
         SessionStateModule.ReadConnectionString(sessionState, ref stateConnectionString, "stateConnectionString");
         s_singlePartitionInfo = (StateServerPartitionInfo) this.CreatePartitionInfo(stateConnectionString);
     }
     else
     {
         s_usePartition = true;
         s_partitionManager = new PartitionManager(new System.Web.CreatePartitionInfo(this.CreatePartitionInfo));
     }
     s_networkTimeout = (int) sessionState.StateNetworkTimeout.TotalSeconds;
     string appDomainAppIdInternal = HttpRuntime.AppDomainAppIdInternal;
     string str3 = MachineKeySection.HashAndBase64EncodeString(appDomainAppIdInternal);
     if (appDomainAppIdInternal.StartsWith("/", StringComparison.Ordinal))
     {
         s_uribase = appDomainAppIdInternal + "(" + str3 + ")/";
     }
     else
     {
         s_uribase = "/" + appDomainAppIdInternal + "(" + str3 + ")/";
     }
     s_onAppDomainUnload = new EventHandler(this.OnAppDomainUnload);
     Thread.GetDomain().DomainUnload += s_onAppDomainUnload;
     s_oneTimeInited = true;
 }
        void OneTimeInit() {
            SessionStateSection config = RuntimeConfig.GetAppConfig().SessionState;

            s_configPartitionResolverType = config.PartitionResolverType;
            s_configStateConnectionString = config.StateConnectionString;
            s_configStateConnectionStringFileName = config.ElementInformation.Properties["stateConnectionString"].Source;
            s_configStateConnectionStringLineNumber = config.ElementInformation.Properties["stateConnectionString"].LineNumber;
            s_configCompressionEnabled = config.CompressionEnabled;

            if (_partitionResolver == null) {
                String stateConnectionString = config.StateConnectionString;

                SessionStateModule.ReadConnectionString(config, ref stateConnectionString, "stateConnectionString");

                s_singlePartitionInfo = (StateServerPartitionInfo)CreatePartitionInfo(stateConnectionString);
            }
            else {
                s_usePartition = true;
                s_partitionManager = new PartitionManager(new CreatePartitionInfo(CreatePartitionInfo));
            }

            s_networkTimeout = (int)config.StateNetworkTimeout.TotalSeconds;

            string appId = HttpRuntime.AppDomainAppId;
            string idHash = Convert.ToBase64String(CryptoUtil.ComputeSHA256Hash(Encoding.UTF8.GetBytes(appId)));

            // Make sure that we have a absolute URI, some hosts(Cassini) don't provide this.
            if (appId.StartsWith("/", StringComparison.Ordinal)) {
                s_uribase = appId + "(" + idHash + ")/";
            }
            else {
                s_uribase = "/" + appId + "(" + idHash + ")/";
            }

            // We only need to do this in one instance
            s_onAppDomainUnload = new EventHandler(OnAppDomainUnload);
            Thread.GetDomain().DomainUnload += s_onAppDomainUnload;

            s_oneTimeInited = true;
        }
 private void OneTimeInit()
 {
     SessionStateSection sessionState = RuntimeConfig.GetAppConfig().SessionState;
     s_configPartitionResolverType = sessionState.PartitionResolverType;
     s_configSqlConnectionFileName = sessionState.ElementInformation.Properties["sqlConnectionString"].Source;
     s_configSqlConnectionLineNumber = sessionState.ElementInformation.Properties["sqlConnectionString"].LineNumber;
     s_configAllowCustomSqlDatabase = sessionState.AllowCustomSqlDatabase;
     s_configCompressionEnabled = sessionState.CompressionEnabled;
     if (this._partitionResolver == null)
     {
         string sqlConnectionString = sessionState.SqlConnectionString;
         SessionStateModule.ReadConnectionString(sessionState, ref sqlConnectionString, "sqlConnectionString");
         s_singlePartitionInfo = (SqlPartitionInfo) this.CreatePartitionInfo(sqlConnectionString);
     }
     else
     {
         s_usePartition = true;
         s_partitionManager = new PartitionManager(new System.Web.CreatePartitionInfo(this.CreatePartitionInfo));
     }
     s_commandTimeout = (int) sessionState.SqlCommandTimeout.TotalSeconds;
     s_retryInterval = sessionState.SqlConnectionRetryInterval;
     s_isClearPoolInProgress = 0;
     s_onAppDomainUnload = new EventHandler(this.OnAppDomainUnload);
     Thread.GetDomain().DomainUnload += s_onAppDomainUnload;
     s_oneTimeInited = true;
 }