Beispiel #1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            // initialize secure setting manager
            SecureConfigManager.Initialize(new NoEncryptionManager());

            ////TODO: uncomment to step through a file...
            //Test();
            //return;

            ServiceBase[] ServicesToRun;
            ServicesToRun = new ServiceBase[]
            {
                new TISService()
            };
            ServiceBase.Run(ServicesToRun);
        }
Beispiel #2
0
        /// <summary>
        /// Handles the Start event of the Application control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        protected void Application_Start(object sender, EventArgs e)
        {
            // Connection strings are secure (encrypted). Setup the Config Manager to take care of decryption
            SecureConfigManager.Initialize();

            RegisterServices();

            // Ignore any SSL cert errors (in case our servers are running self signed)
            ServicePointManager.ServerCertificateValidationCallback = ValidateServerCertificate;

            // Run all the startup Tasks
            ExecuteStartupTasks();

            // Kick off the timer
            Setup();
        }
        protected void Application_Start(object sender, EventArgs e)
        {
            // handle encrypted configuration data
            SecureConfigManager.Initialize(new NoEncryptionManager());

            //record start time by initializing the statistics recorder
            Utilities.Statistics.Initialize();

            // configure webapi routing
            GlobalConfiguration.Configuration.Routes.MapHttpRoute(
                name: "DefaultApi",
                routeTemplate: "api/{controller}/{id}",
                defaults: new { id = RouteParameter.Optional }
                );

            TISServices.Utilities.TISServicesLogger.Log("Application started");
        }