WebClient, DownloadFile, OpenRead Does not retrive last modify file

H

Harvey Triana

Hi-

I am using...

WebClient Client = new WebClient ();
Client.DownloadFile(url, filename);
Or
Stream strm = Client.OpenRead (url);



But, the stream or file download, is not updated, several calls to url
retrive the same file. The file behind url is update each two seconds.



- How recover the most recent version of the file, in each call of
WebClient?




regards,

<ht />
 
G

George Ter-Saakov

You have a caching problem.

do you have a proxy server between your computer and the server? Usually
they will cache files and return the same file for every request.

Nothing you can do about it except buying bottle of whisky and go to admins
of that proxy :)

George.
 
H

Harvey Triana

This trap works!
Stream r = wc.OpenRead(Url + "?t="+ DateTime.Now.Ticks.ToString());

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top