Пример #1
0
 private void Application_Start(object sender, EventArgs e)
 {
     Diagnostics.InitializeWatsonReporting();
     if (Globals.InstanceType == InstanceType.NotInitialized)
     {
         string text = HttpProxyGlobals.ProtocolType.ToString();
         text = "FE_" + text;
         Globals.InitializeMultiPerfCounterInstance(text);
     }
     Diagnostics.SendWatsonReportOnUnhandledException(delegate()
     {
         Task.Factory.StartNew(delegate()
         {
             SettingOverrideSync.Instance.Start(true);
         });
         CertificateValidationManager.RegisterCallback(Constants.CertificateValidationComponentId, ProxyApplication.RemoteCertificateValidationCallback);
         ProxyApplication.ConfigureServicePointManager();
         if (DownLevelServerManager.IsApplicable)
         {
             DownLevelServerManager.Instance.Initialize();
         }
     });
     PerfCounters.UpdateHttpProxyPerArrayCounters();
     Diagnostics.Logger.LogEvent(FrontEndHttpProxyEventLogConstants.Tuple_ApplicationStart, null, new object[]
     {
         HttpProxyGlobals.ProtocolType
     });
 }
Пример #2
0
 private static void ConfigureServicePointManager()
 {
     ServicePointManager.DefaultConnectionLimit = HttpProxySettings.ServicePointConnectionLimit.Value;
     ServicePointManager.UseNagleAlgorithm      = false;
     ProxyApplication.ConfigureSecureProtocols();
 }