Sounds like a caching issue. Assuming that you do not control or do not want to change the response on the server side, you can try adding a random query string for each call and see if it fixes this. For example, set URLS.host
to:
URLS.host = String.Format("{0}&rnd={1}", URLS.host, Guid.NewGuid().ToString()); HttpWebRequest wr = (HttpWebRequest)WebRequest.Create(URLS.host);
Alternatively, you can try the solution from this post .
HttpWebRequest request = HttpWebRequest.CreateHttp(url); if (request.Headers == null) { request.Headers = new WebHeaderCollection(); } request.Headers[HttpRequestHeader.IfModifiedSince] = DateTime.UtcNow.ToString();
source share