Source Code for Me (s-c.me)

Allows you to paste souce code to blogs! Adapted for Twitter! Here is Search Form in case you missed your code.
Code:
Selected Language:
Show Linenumbers:
Short link for Twitter:
HTML:

HTML view:

Copy Source | Copy HTML
  1. /// <summary>
  2. /// Запуск роли
  3. /// </summary>
  4. /// <returns></returns>
  5. public override bool OnStart()
  6. {
  7.     try
  8.     {
  9.         ConfigureAzureDiagnostics();
  10.         ServerManager iisManager = new ServerManager();
  11.         //iisManager.ApplicationPoolDefaults.ProcessModel.PingingEnabled = false;//запрещаем пинги! НО ТАК НЕЛЬЗЯ
  12.         iisManager.ApplicationPoolDefaults.ProcessModel.PingResponseTime = TimeSpan.FromMinutes(20);
  13.         iisManager.ApplicationPoolDefaults.ProcessModel.PingInterval = TimeSpan.FromMinutes(5);
  14.         iisManager.ApplicationPoolDefaults.ProcessModel.StartupTimeLimit = TimeSpan.FromMinutes(20);
  15.         iisManager.ApplicationPoolDefaults.QueueLength = 3000;
  16.         //iisManager.ApplicationPoolDefaults.Recycling.PeriodicRestart.Schedule.Clear();
  17.         //iisManager.ApplicationPoolDefaults.Recycling.PeriodicRestart.Schedule.Add(TimeSpan.FromHours(8));
  18.         iisManager.CommitChanges();
  19.         Trace.WriteLine("Role Started!");
  20.     }
  21.     catch (Exception e1)
  22.     {
  23.         Trace.Write(e1);
  24.     }
  25.     return base.OnStart();
  26. }




Based on Manoli.Net's CodeFormatter. Made by Topbot (c) 2008-2018