The operation has timed out
- by np
We shave this code which result in timeout when downlaoding the file programatically:
System.Net.WebClient Client = new System.Net.WebClient();
if (!File.Exists(fileName))
{
Client.DownloadFile(downloadLink, fileName);
HtFilesSuccessfullyDownloaded[fileName] = fileName;
string SuccessfullyDownloadedFiles = Path.Combine(dirName, "SuccessfullyDownloadedFiles.txt");
File.AppendAllText(SuccessfullyDownloadedFiles, Environment.NewLine + fileName);
}
It looks like when the files are large we are getting the timeout error when DownloadFile method is called. We have added the followign in web.config but it does not look like it helps:
<httpRuntime maxRequestLength="1048576" executionTimeout="3600"
/>
Please let me know if you have any suggestions.