Recently, I encountered a HTML Agility Pack error. I like to write some code using Visual Studio and C#. I downloaded the HTML Agility Pack recently and I must say, I’m well impressed.

I was using C# and Visual Studio 2019 Community edtion and downloading some html and kept getting the above error. You know what fixed it…

System.Threading.Thread.Sleep(1000);

I put this just after the Load and the Get. I figured, maybe the Pack needs a bit of time to download and complete. I’ve got an SSD in my dev machine, so maybe you might have to increase this, it’s in milliseconds by the way.

This sorted out my HTML Agility Pack error, let me know if it sorts your problem out too!

Sequallity provide remote SQL Server DBA/Developer services to anywhere in the world. Send us an email at info @ sequallity.co.uk.

Leave a Reply