WebClient, DownloadFile, OpenRead Does not retrive last modify file

08/02/2008 - 19:02 por Harvey Triana | Informe spam
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 />

Preguntas similare

Leer las respuestas

#1 Harvey Triana
08/02/2008 - 19:10 | Informe spam
Disculpas, este posting no era para este grupo en español.. Los afanes.


"Harvey Triana" escribió en el mensaje
news:
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 />


Respuesta Responder a este mensaje
#2 George Ter-Saakov
08/02/2008 - 19:15 | Informe spam
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.



"Harvey Triana" wrote in message
news:
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 />


Respuesta Responder a este mensaje
#3 Harvey Triana
08/02/2008 - 19:40 | Informe spam
This trap works!
Stream r = wc.OpenRead(Url + "?t="+ DateTime.Now.Ticks.ToString());

Thanks

"George Ter-Saakov" escribió en el mensaje
news:OU$
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.



"Harvey Triana" wrote in message
news:
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 />






Respuesta Responder a este mensaje
#4 George Ter-Saakov
08/02/2008 - 19:46 | Informe spam
You right, forgot about that trick although using it myself :)

George.


"Harvey Triana" wrote in message
news:
This trap works!
Stream r = wc.OpenRead(Url + "?t="+ DateTime.Now.Ticks.ToString());

Thanks

"George Ter-Saakov" escribió en el mensaje
news:OU$
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.



"Harvey Triana" wrote in message
news:
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 />










email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida