I have a console application that includes (new WebClient()).DownloadFile(source,target) (short for short).
I am running on a Windows 2003 server, on top of rdp.
When the server is blocked (it is blocked after several minutes of non-use), the program simply stops working, it just crashes or something else, it just does not progress.
Console.WriteLine("Downloading to {0} ...", localTempFile); sw.Start(); Client.DownloadFile(url + "/" + fileName, localTempFile); sw.Stop(); Console.WriteLine("{0} | Done in {1}s",DateTime.Now,sw.ElapsedMilliseconds / 1000);
I really donβt know where to start with this problem, thereβs nothing complicated, itβs just a simple linear console application. Any ideas?
source share