Ejemplo n.º 1
0
 protected void Application_Start(object sender, EventArgs e)
 {
     log4net.Config.XmlConfigurator.Configure();
     AppServerDataInitializer.Init();
     SessionCenter.Start();
     //SessionCenter.EmailTiming();
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            log4net.Config.XmlConfigurator.Configure();
            AppServerDataInitializer.Init();
            var uri =
                new Uri(System.Configuration.ConfigurationManager.AppSettings["Server"]);

            using (var host = new NancyHost(uri))
            {
                host.Start();
                SessionCenter.Start();
                //SessionCenter.EmailTiming(); -- 邮件定时发送
                Console.WriteLine("Your application is running on " + uri);
                Console.WriteLine("Press any [Enter] to close the host.");
                Console.ReadLine();
                SessionCenter.Stop();
            }
        }