Stupid Me
- From: "Thomas Weise" <thomas@xxxxxxxxxxxxxxxx>
- Date: Wed, 16 Jan 2008 20:08:14 +0100
HttpWebResponse works ok, it was just me who screwed the results up later in
my app.
Instead of renewing the internal representation of the HTML page, I always
added the newly downloaded text to the one already present.
"Thomas Weise" <thomas@xxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:%23GfF428VIHA.1376@xxxxxxxxxxxxxxxxxxxxxxx
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
.
- References:
- HttpWebRequest does not detect new Vversion of remote file
- From: Thomas Weise
- HttpWebRequest does not detect new Vversion of remote file
- Prev by Date: Re: Email Programming using System.Web.Mail
- Next by Date: C# / VB.NET inline namespaces, how can I do: New System.Windows.Forms.MessageBox?
- Previous by thread: HttpWebRequest does not detect new Vversion of remote file
- Next by thread: how to pass by const reference?
- Index(es):
Relevant Pages
|