WebClient, DownloadFile, OpenRead Does not retrive last modify file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Harvey Triana

    WebClient, DownloadFile, OpenRead Does not retrive last modify file

    Hi-

    I am using...

    WebClient Client = new WebClient ();
    Client.Download File(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 />


  • Harvey Triana

    #2
    Re: WebClient, DownloadFile, OpenRead Does not retrive last modify file

    Disculpas, este posting no era para este grupo en español.. Los afanes.


    "Harvey Triana" <eslender2007@h otmail.comescri bió en el mensaje
    news:OlV0u0naIH A.4476@TK2MSFTN GP06.phx.gbl...
    Hi-
    >
    I am using...
    >
    WebClient Client = new WebClient ();
    Client.Download File(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 />
    >
    >

    Comment

    • George Ter-Saakov

      #3
      Re: WebClient, DownloadFile, OpenRead Does not retrive last modify file

      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" <eslender2007@h otmail.comwrote in message
      news:OlV0u0naIH A.4476@TK2MSFTN GP06.phx.gbl...
      Hi-
      >
      I am using...
      >
      WebClient Client = new WebClient ();
      Client.Download File(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 />
      >
      >

      Comment

      • Harvey Triana

        #4
        Re: WebClient, DownloadFile, OpenRead Does not retrive last modify file

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

        Thanks

        "George Ter-Saakov" <gt-nsp@cardone.com escribió en el mensaje
        news:OU$io6naIH A.1532@TK2MSFTN GP04.phx.gbl...
        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" <eslender2007@h otmail.comwrote in message
        news:OlV0u0naIH A.4476@TK2MSFTN GP06.phx.gbl...
        >Hi-
        >>
        >I am using...
        >>
        >WebClient Client = new WebClient ();
        >Client.Downloa dFile(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 />
        >>
        >>
        >
        >

        Comment

        • George Ter-Saakov

          #5
          Re: WebClient, DownloadFile, OpenRead Does not retrive last modify file

          You right, forgot about that trick although using it myself :)

          George.


          "Harvey Triana" <eslender2007@h otmail.comwrote in message
          news:urAJnJoaIH A.5348@TK2MSFTN GP03.phx.gbl...
          This trap works!
          Stream r = wc.OpenRead(Url + "?t="+ DateTime.Now.Ti cks.ToString()) ;
          >
          Thanks
          >
          "George Ter-Saakov" <gt-nsp@cardone.com escribió en el mensaje
          news:OU$io6naIH A.1532@TK2MSFTN GP04.phx.gbl...
          >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" <eslender2007@h otmail.comwrote in message
          >news:OlV0u0naI HA.4476@TK2MSFT NGP06.phx.gbl.. .
          >>Hi-
          >>>
          >>I am using...
          >>>
          >>WebClient Client = new WebClient ();
          >>Client.Downlo adFile(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 />
          >>>
          >>>
          >>
          >>
          >
          >

          Comment

          Working...