Exemplo n.º 1
0
 /// <summary>
 /// Vstupný bot programu pre WcfHostService
 /// </summary>
 static void Main() //string[] args
 {
     using (var host = new ServiceHost(typeof(WcfKangoService)))
     {
         System.ServiceModel.Description.ServiceThrottlingBehavior throttlingBehavior =
             new System.ServiceModel.Description.ServiceThrottlingBehavior
         {
             MaxConcurrentCalls     = Int32.MaxValue,
             MaxConcurrentInstances = Int32.MaxValue,
             MaxConcurrentSessions  = Int32.MaxValue
         };
         host.Description.Behaviors.Add(throttlingBehavior);
         host.Open();
         Console.WriteLine("Server odstartovany!");
         Console.ReadLine();
         host.Close();
     }
 }
Exemplo n.º 2
0
 static void Main(string[] args)
 {
     using (var host = new ServiceHost(typeof(DissertationThemesService)))
     {
         System.ServiceModel.Description.ServiceThrottlingBehavior throttlingBehavior =
             new System.ServiceModel.Description.ServiceThrottlingBehavior();
         throttlingBehavior.MaxConcurrentCalls     = Int32.MaxValue;
         throttlingBehavior.MaxConcurrentInstances = Int32.MaxValue;
         throttlingBehavior.MaxConcurrentSessions  = Int32.MaxValue;
         host.Description.Behaviors.Add(throttlingBehavior);
         host.Open();
         Console.WriteLine("Server odstartovany");
         //DissertationThemesService dts = new DissertationThemesService();
         //Console.WriteLine(dts.GenerateDocx(1216));
         Console.ReadLine();
         host.Close();
     }
 }