I am running AcuGT V9.2.3 on a Windows 7 PC and need a AcuGT program to download multiple data files from a US Treasury Dept website for processing. I wrote a sample program using WebClient .NET features to pull the files from the website, most of the time this program works just fine but other times it is failing with a Webclient error that reads: The remote server returned an error: (407) Proxy Authentication Required" and then the program simply crashes. What is odd is the random nature of this failure, I can run the program 10 times in a row and it will run just fine, then I can run it 5 times and it will fail with this error. Five minutes later I can run the program again and it runs just fine. The results appear to be completely random at this point.
Couple questions:
1) Is there a better way to have my AcuGT program download files from a website or is Webclient the best approach?
2) If Webclient is the best approach is there a way to capture errors like this so that my program doesn't simply crash when these errors occur?
Any guidance would be appreciate.



