hi
Yesterday I completed my project, but today, when I ran the same code, it hangs on WebClient.DownloadFile () and, in the end, shuts down with this error message:
"Unhandled exception like" System.Net.WebException "occurred in System.dll "
So, I tried to run only the web client in a new project, downloading it from a hard-coded URL, which, as I know, looks like this.
static void Main(string[] args)
{
WebClient client = new WebClient();
client.DownloadFile("http://www.ashersarlin.com/cartoons/officerap2.gif", "pic.gif");
}
The same thing is happening. It creates an empty pic.gif file, but eventually ends.
I could use some pointers. I am new to .NET and have no idea how to fix this problem.
source
share