473,385 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Dispable http Caching at proxy and local level

Hello All,

How do I completly and totally disable any kind of caching when making a
HttpWebRequest. I have an application which downloads a file from the
web. This file is updated on a daily basis.

However, my application keeps downloading the same file again and again.
When I open the same URL from my browser and hit the refresh button, I
see the new version of the file.

Here is the code which I have written.

HttpWebRequest request = (HttpWebRequest)
WebRequest.Create("http://www.myserver.com/downloadfile.asp");
WebProxy proxy = new WebProxy();
proxy.Address = new Uri("http://myproxy:8088");
request.Proxy = proxy;
HttpWebResponse response = (HttpWebResponse) request.GetResponse();
if (response != null)
{
Stream responseStream = response.GetResponseStream();
Encoding encoding = Encoding.GetEncoding("UTF-8");
if (reader != null)
{
char[] buffer = new char[BUFFER_SIZE];
int count = reader.Read(buffer, 0, BUFFER_SIZE);
while(count > 0)
{
......
}
}
}
I saw all the properties of the HttpWebRequest and WebProxy classes but
could find anything which disables caching for me.

Thanks for your help in advace.

regards,
Abhishek.
Nov 15 '05 #1
0 1164

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Paul | last post by:
I thought this is more of an IE issue but i've had no joy on that group perhaps somebody here will have a clue. If i click a link to a web page embedded in Excel (97 OR 2000) i get the standard...
0
by: PeterJ | last post by:
I created some web pages in Visual Studio 2003 in VB and sent them to another fellow to be rolled up into an application. This was sent back to me and I could not open the whole application. Now...
6
by: ZagrebMike | last post by:
On our (intranet) web site we have an ASP page that runs a report which serves up the results in a dynamic Excel file (i.e it specifies Response.ContentType = "application/vnd.ms-excel"). This...
1
by: Abhishek Srivastava | last post by:
Hello All, Apologies to everyone, I posted this before but received no response. I feel someone must have come accross this problem before, and I need a solution desparately. I have written a...
12
by: Griff | last post by:
I have a two tier system. I've created a COM+ package on the data tier (Win2003) and exported it as a COM+proxy (v 1.0 compliant) and installed this onto a Win2000 web application. I've...
5
by: Raj | last post by:
What is the purpose of file system caching while creating a tablespace? Memory on the test server gets used up pretty quickly after a user executes a complex query(database is already activated),...
0
by: John | last post by:
We have an asp.net application and it is set not to cache on server, client and proxy server. It works great and web pages are not cached when you are not going through proxy server but if you...
0
by: John | last post by:
We want to prevent the caching in our project, so we have the following line of code in the page load function Response.AppendHeader("Cache-Control", "no-store"); But when we are using proxy...
6
by: ALi Shaikh | last post by:
e decided to stay at home to scrutinize is system's HTTP performance. We were upset that our browser only supported HTTP 1.0 and therefore seemed to perform poorly (even though he recently upgraded...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.