Imports System.Web.Optimization
Imports System.Configuration
Public Class MvcApplication
    Inherits System.Web.HttpApplication

    Protected Sub Application_Start()

            ' Apply the DenyLocalFileAccess flag from Web.config globally.
            ' When true, SelectPdf rejects any attempt to convert local files / file:// URLs.
            Dim deny As Boolean = False
            Boolean.TryParse(ConfigurationManager.AppSettings("DenyLocalFileAccess"), deny)
            Global.SelectPdf.GlobalProperties.ForceDenyLocalFileAccess = deny
        AreaRegistration.RegisterAllAreas()
        FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters)
        RouteConfig.RegisterRoutes(RouteTable.Routes)
        BundleConfig.RegisterBundles(BundleTable.Bundles)
    End Sub
End Class
