C# webclient cannot download text from web
C# webclient cannot download text from web I am working on a project to get text from this website. But when I tested it in Visual Studio, I've got some error: Value cannot be null. Parameter name: solutionDirectory Here is my code: using System; using System.Net; public class Program { public static void Main() { WebClient client = new WebClient(); String temp = client.DownloadString("http://www.hkex.com.hk/eng/stat/dmstat/dayrpt/hsio180629.htm"); Console.Write(temp); } } This is not a problem with the code you presented, which other than a missing using works fine. – spender Jul 2 at 10:22 using Works for me... – TheGeneral Jul 2 at 10:22 ...