Note 3: No EXCEPTION is thrown in case of damaged files. Note 2: All files are Oracle reports and get generated by querying a database. Note 1: I don’t want a file to start download until its precedence is completely downloaded, that’s why I am not using the asynchronous method. It’s not always the same files that get damaged, and when I re-run the application, those files often succeed, and some others might fail… it seems to be random and I can’t find out the criteria. “…it’s either not a supported file type or because the file has been damaged…” The problem is that almost each time the application is run, some of downloaded files are damaged, only 7KBs are downloaded (I think it’s for meta data), and Acrobat Reader gives me a message when I try to open the file: My code loops through a list of URLs (about 400), and for each URL it calls DownloadFile method, and the corresponding report is generated and downloaded to local machine. ![]() To download a resource and continue executing while waiting for the server's response, use one of the DownloadFileAsync methods. ![]() This method blocks while downloading the resource. Reports are of different sizes and take different periods of time to get generated. The DownloadFile method downloads to a local file data from the URI specified by in the address parameter. In my Windows application I am using WebClient DownloadFile method to download several PDF files from a server on local network.Įach file is a report that gets generated when its URL is called.
0 Comments
Leave a Reply. |