T
Thomas Weise
My app looks frequently onto a WEB page to check if a newer version is
available.
My code looks like this:
Private Sub ReadHtmlFile()
Dim hwRequest As HttpWebRequest
Dim hwResponse As HttpWebResponse
Dim srUpdate As IO.StreamReader
hwRequest =
CType(WebRequest.Create("http://www.mydomain.com/version.html"),
HttpWebRequest)
hwRequest.AllowAutoRedirect = False
hwResponse = CType(hwRequest.GetResponse, HttpWebResponse)
srUpdate = New IO.StreamReader(hwResponse.GetResponseStream,
Encoding.ASCII
...
End Sub
When the app is launched, it ready the most recent version of "version.html"
from the remote WEB server.
However, when I update "version.html" while the app is running, it does not
obtain the most recent version, but HttpWebResponse returns the outdated
file it read at the first time. Obviously the file is buffered somehow.
Does anybody have a clue how I can get around this?
Best regards, Thomas
available.
My code looks like this:
Private Sub ReadHtmlFile()
Dim hwRequest As HttpWebRequest
Dim hwResponse As HttpWebResponse
Dim srUpdate As IO.StreamReader
hwRequest =
CType(WebRequest.Create("http://www.mydomain.com/version.html"),
HttpWebRequest)
hwRequest.AllowAutoRedirect = False
hwResponse = CType(hwRequest.GetResponse, HttpWebResponse)
srUpdate = New IO.StreamReader(hwResponse.GetResponseStream,
Encoding.ASCII
...
End Sub
When the app is launched, it ready the most recent version of "version.html"
from the remote WEB server.
However, when I update "version.html" while the app is running, it does not
obtain the most recent version, but HttpWebResponse returns the outdated
file it read at the first time. Obviously the file is buffered somehow.
Does anybody have a clue how I can get around this?
Best regards, Thomas