HTTPWebrequest缓存数据 [英] HTTPWebrequest Caching Data

查看:166
本文介绍了HTTPWebrequest缓存数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建的一小部分应用程序存在问题.我正在使用HTTPWebRequest从Web服务器(不是我控制的服务器)上的文本文件下载数据,然后将该文本文件的内容读取为字符串,然后进行操作 填写几个文本框.

I'm having an issue with a small part of an application I'm creating. I'm downloading data from a text file on a web server (not one I control) using HTTPWebRequest and then reading the contents of that text file into a string, which I then manipulate to fill in several text boxes.


推荐答案

我遇到了同样的问题.但是放一些兰特来查询URL就解决了这个问题(我以前用 NextDouble()).
我不知道为什么您仍然会得到相同的数据.
检查您的代理设置(在XDE和PC上),检查在PC上的浏览器中是否获取了新数据.

还有一个...移动随机  =    Random(); 到某个静态字段...您不必每次都创建Random的新实例.
I had the same problem. But put some rand to query URL solved the problem (I used NextDouble() ).
I don't known why you still get the same data.
Check your proxy settings (on XDE and PC), check if in your browser on PC you get new data.

And one more... move Random random = new Random(); to some static field... you don't need to create new instance of Random every time.


这篇关于HTTPWebrequest缓存数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆