'Unsupported by Aspose.HTML for .NET symbols in the name of input html file
I am using Aspose.HTML for .NET library and I found out that it doesn’t support ‘#’ character in the name of the input html file when windows handles it OK. Is there any solution of this issue?
Here is sample code:
using (var document = new HTMLDocument(@“D:\work\!%@&$^#.html”))
{
Console.WriteLine(document.BaseURI);
Console.WriteLine(“OK”);
}
Exception I get:
Unhandled Exception: System.Exception: ‘file:///D:/work/!%@&$^#.html’ could not be found. —> Aspose.Html.Dom.DOMException: ‘file:///D:/work/!%@&$^#.html’ could not be found.
at :clubs: .:heart: [T](UInt16 :slight_smile:, String :heart:, String :clubs:, Object[])
at :clubs: .:heart:(String :slight_smile:, Object[] :heart:)
at Aspose.Html.Dom.Document.:heart: .:slight_smile:.:slight_smile:()
at :clubs: .:slight_smile:()
— End of inner exception stack trace —
at .:heart: :slight_smile:(Boolean :slight_smile:)
at :heart: .Dispose()
at Aspose.Html.Dom.Document.:slight_smile:(☼ :slight_smile:)
at Aspose.Html.Dom.Document…ctor(IDocumentInit documentInit)
at Aspose.Html.HTMLDocument…ctor(RequestMessage :slight_smile:, Configuration :heart:, Byte :clubs:)
at Aspose.Html.HTMLDocument…ctor(String address)
at ConsoleApplication1.Program.Main(String[] args) in D:\Labs\PathTest\ConsoleApplication1\Program.cs:line 19
This file definitely exists. I am using Aspose.HTML 20.11.0. Updating to the latest one doesn’t solve this issue
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
