Ask a Question related to ASP.NET General, Design and Development.
-
YA #1
WebClient.DownloadData without cache
I am using WebClient to download a text file from the net every 2 minutes.
The problem is that I think I am reading the file from cache since when the
file is change I still get the old file.
Here is my code:
Dim myWebClient As New WebClient()
Dim responseArray As Byte() = myWebClient.DownloadData(szURL)
How can I tell WebClient not to use cache ?
Thanks in advance
[email]ra294@hotmail.com[/email]
YA Guest
-
Webclient w/ Proxy
I have a WebClient.OpenRead that is timing out on some client machines. I believe the problem may be Proxy settings on the client machine. How... -
webclient.downloadfile
I've been toying with an asp.net diretory browser and have been trying to use system.net.webclient.downloadfile as a means to download files from... -
Webclient.DownloadData() behind a firewall
Hello, I'm using webclient.downloadData to scrape HTML from a website and was wondering if anyone has experienced any problems using this class... -
CookieContainer with WebClient
Any help appreciated ... I am trying to connect to a site that requires authentication through cookies, and be able to navigate through several... -
WebClient Problem
hi, i using WebClient to get the website. like string URL = "http://127.0.0.1/index.htm"; WebClient client = new WebClient(); Stream data =... -
Chris Langsenkamp #2
Re: WebClient.DownloadData without cache
Two things to try:
1) Server cache control:
..asp page instead of .txt file in your url, .asp includes anti-caching headers ahead of the text file content read from the text
file. see FileSystemObject in ASP to read the file content.
2) make browser think it's a new url:
append "?r=" & rnd * 999999 to the url of the txt file. The web server won't care about the trailing stuff but the browser thinks
it's gonna get a new result and will fetch it. This syntax may not be perfect but you get the idea that a constantly changing
QueryString portion of the URL will make browser keep pulling from the server.
Chris Langsenkamp
[url]http://chat.cleverchat.net/[/url]
----- Original Message -----
"YA" <ra294@hotmail.com> wrote in message news:%23gRbWFKYDHA.656@tk2msftngp13.phx.gbl...
I am using WebClient to download a text file from the net every 2 minutes.
The problem is that I think I am reading the file from cache since when the
file is change I still get the old file.
Here is my code:
Dim myWebClient As New WebClient()
Dim responseArray As Byte() = myWebClient.DownloadData(szURL)
How can I tell WebClient not to use cache ?
Thanks in advance
[email]ra294@hotmail.com[/email]
Chris Langsenkamp Guest



Reply With Quote

