Imports System
Imports System.Configuration
Imports SelectPdf

Public Class Global_asax
    Inherits System.Web.HttpApplication

    Protected Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
        ' 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)
        GlobalProperties.ForceDenyLocalFileAccess = deny
    End Sub
End Class
