We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unsupported symbols in the name of the html file

Hi, I am using Aspose.HTML 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”))

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.


Could you please ZIP and attach your input HTML here for testing? We will investigate the issue and provide you more information on it.


Yes, of course. Thanks for your reply

html.zip (15.3 KB)


We have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as HTMLNET-3694. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.