aspNetEmail

HtmlUtility.AllowFileScheme Property

Allows Html to be loaded from the file:/// scheme.

public bool AllowFileScheme {get; set;}

Remarks

By default, this value is false. This provides unauthorized use of accessing the filesystem, unless explicitly set by the developer.

Example

[C#]
            HtmlUtility utility = new HtmlUtility();
            string url = "file://c:/temp/test.htm";
             
            utility.AllowFileScheme = true;
            utility.LoadUrl( url );
            utility.Render();
             
            EmailMessage email = new EmailMessage( true, false );
            email.Subject = "Html Utility test";
             
            email = utility.ToEmailMessage( email );
             
            email.Send();
                
[Visual Basic]
            Dim utility As New HtmlUtility()
            Dim url As String = "file://c:/temp/test.htm"
             
            utility.AllowFileScheme = True
            utility.LoadUrl(url)
            utility.Render()
             
            Dim email As New EmailMessage(True, False)
            email.Subject = "Html Utility test"
             
            email = utility.ToEmailMessage(email)
             
            email.Send()
                

See Also

HtmlUtility Class | aspNetEmail Namespace