using System;
using System.Configuration;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
namespace SelectPdf.Samples
{
    public class MvcApplication : System.Web.HttpApplication
    {
        protected void Application_Start()
        {
            // Apply the DenyLocalFileAccess flag from Web.config globally.
            // When true, SelectPdf rejects any attempt to convert local files / file:// URLs.
            bool deny;
            bool.TryParse(ConfigurationManager.AppSettings["DenyLocalFileAccess"], out deny);
            global::SelectPdf.GlobalProperties.ForceDenyLocalFileAccess = deny;

            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }
    }
}
