' Note: For instructions on enabling IIS6 or IIS7 classic mode, 
' visit http://go.microsoft.com/?LinkId=9394802
Imports System.Web.Http
Imports System.Configuration
Public Class MvcApplication
    Inherits System.Web.HttpApplication

    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()

        WebApiConfig.Register(GlobalConfiguration.Configuration)
        FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters)
        RouteConfig.RegisterRoutes(RouteTable.Routes)
    End Sub
End Class
