2

I know there are several solutions in other languages but I can't find anything in VB.NET.

I have a file containing the "software version" on an FTP server, however everytime the program tries to read it through the WebBrowser, it picks up an old version of it. In other words the cached version.

Is there anything that can use to clear the cache for just the one file?

Code so far:

Dim WebBR As New WebBrowser
WebBR.Navigate("URL\Version.txt", False)
Do Until WebBR.ReadyState = WebBrowserReadyState.Complete
    Application.DoEvents()
Loop
Dim VRB = WebBR.Document.Body.InnerHtml
VRB = VRB.Replace("<PRE>", "")
VRB = VRB.Replace("</PRE>", "")
NewVersion = VRB
If NewVersion <> CurrentVersion Then
    Return True
Else
    Return False
End If
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Bob.Tri
  • 55
  • 6

1 Answers1

0

Why do you read the file though web browser? That's an overkill.

Use the FtpWebRequest. It does not have any cache.

See also:

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992