protected override void Initialize()
        {
            base.Initialize();

            this.UseEncryptionQueue  = Settings.Default.UseEncryptionQueue;
            this.EncrptionQueueLimit = Settings.Default.EncryptionQueueLimit;

            WebRequest.DefaultWebProxy = null;

            this.InitHealthMonitoring();

            this.AuthenticationHandler = AccountServiceFactory.GetAuthenticationHandler(this.HealthMonitor);
            this.AuthenticationCache   = AccountCache.CreateCache(this.AuthenticationHandler, false);

            CounterPublisher.DefaultInstance.AddStaticCounterClass(typeof(Counter), this.ApplicationName);
            CounterPublisher.DefaultInstance.AddStaticCounterClass(typeof(PhotonCustomAuthCounters), this.ApplicationName);
            try
            {
                Counter.InitializePerformanceCounter(this.ApplicationName);
            }
            catch (Exception ex)
            {
                log.Error(string.Format("Failed to initialize authentication performance counter. Exception Msg:{0}", ex.Message), ex);
            }

            var monitorRequestHandler = new MonitorRequestHandler(this);

            if (!monitorRequestHandler.AddHandler(/*this*/))
            {
                log.WarnFormat("Failed to register requests handler with path:{0}", MonitorRequestHandler.Path);
            }
        }